Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format Document command not works sometimes #303

Closed
hujianxin opened this issue Nov 28, 2017 · 17 comments
Closed

Format Document command not works sometimes #303

hujianxin opened this issue Nov 28, 2017 · 17 comments
Assignees
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@hujianxin
Copy link

Environment data

VS Code version: Version 1.18.1 (1.18.1)
Python Extension version: 0.8.0
Python Version: 3.6
OS and version: macos 10.12.6

Actual behavior

Format Document will use autopep8 or yapf which I have installed can not format my python files. Restart vscode will make it work temporarily。

Expected behavior

Steps to reproduce:

Sorry that I cannot reproduce it in specific steps.

Logs

Output from Python output panel

Output from Console window (Help->Developer Tools menu)

@brettcannon brettcannon added awaiting 1-verification area-formatting bug Issue identified by VS Code Team member as probable bug labels Nov 28, 2017
@rbrtcs1
Copy link

rbrtcs1 commented Nov 28, 2017

I have this issue as well.

VS Code version: Version 1.18.1 (1.18.1)
Python Extension version: 0.8.0
Python Version: 3.6.1
OS and version: tacos 10.11.6

I've only tested this with autopep8, not yapf. It is worth noting that it used to auto-format fine for me, and with no settings changes it stopped working relatively recently (within the last week or so).

My Python output panel is also blank, but my developer tools menu contains the following:
Developer Tools Console Output (pastebin)

@DonJayamanne
Copy link

@rbrtcs1 That issue has been resolved #245 and the fix will be available in the next release (mid-early next month).

@DonJayamanne
Copy link

@hujianxin Please could you open the console window under Help-> Toggle Developer Tools and check if there are any errors logged under there.

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster and removed awaiting 1-verification labels Nov 28, 2017
@hujianxin
Copy link
Author

@DonJayamanne I need to wait for this issue appear again 😄

@hujianxin
Copy link
Author

@DonJayamanne
When I hit shift option f to format document. This error will display.
qq20171207-145905

@hujianxin
Copy link
Author

@hujianxin
Copy link
Author

The format tool is yapf

@brettcannon brettcannon added awaiting 1-verification and removed info-needed Issue requires more information from poster labels Dec 7, 2017
@brettcannon
Copy link
Member

That looks like our feedback code and that should be removed in our next release via #365 .

@hujianxin
Copy link
Author

@brettcannon great, thanks

@toplinuxsir
Copy link

I is a annoy bug , shoud be fixed ASAP,

@brettcannon
Copy link
Member

@toplinuxsir it's fixed in the release that went out today.

@toplinuxsir
Copy link

toplinuxsir commented Dec 14, 2017

@brettcannon Thanks! Great job !

@toplinuxsir
Copy link

toplinuxsir commented Dec 15, 2017

@brettcannon I have just tested with vscode 1.9 and python extension 0.9 The bug is still exist!

@DonJayamanne
Copy link

DonJayamanne commented Dec 15, 2017

@toplinuxsir

The bug is still exist!

The original issue (reported by two others) had an error python.updateFeedbackCounter' not found being logged.

Please could you provide the following:

  • output from the python output panel
  • errors logged in Console windows under Tools->Toggle Developer Tools

@toplinuxsir
Copy link

toplinuxsir commented Dec 15, 2017

@DonJayamanne
console:
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] TextEditor is closed/disposed
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] (node:18796) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] TextEditor is closed/disposed
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249
6/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] (node:18796) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] TextEditor is closed/disposed
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249
10/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] (node:18796) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249
console.ts:123 [Extension Host] (node:18796) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:391
(anonymous) @ extensionHost.ts:211
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104

output for python:
##########Linting Output - flake8##########
182,1,E,E303:too many blank lines (4)

How can I get the output of the yapf formatter when I save python source code ?

@DonJayamanne
Copy link

@toplinuxsir
Please could you create a new issue with the above information.
You're experiencing something completely different, so lets move the discussion out into a new issue.

@zjjott
Copy link

zjjott commented Dec 29, 2017

+1
what day this issue release?

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

6 participants