vscode-python: `Format Document` command not works sometimes

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)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 17 (2 by maintainers)

Most upvoted comments

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

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

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