-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Yapf format sometimes doesn't work #418
Comments
The bug exist from version 0.5 |
I receive a different error for vscode version 1.19.1
|
Appears to be PowerShell extension judging from |
@toplinuxsir - is it broken occasionally at any time or is it not working for some time after opening first Python file? The latter is because it actually takes a few seconds for the extension to load (VSC keeps UI accessible) - for example, Format Document command may not be available in context menu right after the file is opened. |
I've noticed this issue as well when running in a virtualenv. My vscode python interpreter is defined and auto-format on save is set to Seems to be random when it works and when it doesn't. Is there any way to catch log output for the autoformat event? |
@bcatubig anything we log goes to the |
Hey @brettcannon, I've found that by removing Here is what I was using
|
@bcatubig could you try it again without the |
I receive errors with the following settings
here is the log from
|
@bcatubig Please could you try with the following settings: "python.formatting.autopep8Args": [
"--max-line-length" , "120",
] |
@DonJayamanne That seems to have done the trick. autopep8 works now without error. |
@toplinuxsir @mkalakota do either of you happen to have custom yapf configuration settings in your |
Summarizing:
@mkalakota Please could you confirm you are still experiencing this issue. |
@brettcannon No, I do not have any custom @DonJayamanne Yes, it works now. Although, I'm not sure which update resolved the issue, vscode or the plugin |
Thanks for getting back |
Environment data
VS Code version: 1.8.1
Python Extension version: 0.8
Python Version: 3.6.2
OS and version: windows 10
Actual behavior
yapf format not working occasionlly
Expected behavior
format the python source code
Steps to reproduce:
Set vscode format when save
and modify python source code when save
Logs
Output from
Python
output panelOutput from
Console window
(Help->Developer Tools menu)The text was updated successfully, but these errors were encountered: