question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`Format Document` command not works sometimes

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
toplinuxsircommented, Dec 15, 2017

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

1reaction
hujianxincommented, Dec 7, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command "Format Document" doesn't work #426 - GitHub
When i use format document from command pallette (Ctrl + P) Visual Studio Code format the document avoiding all my user settings from ......
Read more >
Why does Prettier not format code in VS Code? - Stack Overflow
Open Files -> Preferences -> Settings (or Ctrl + , in Windows). Search for Editor: Default Formatter; Select your default formatter as Prettier...
Read more >
Tasks in Visual Studio Code
You can create user level tasks that are not tied to a specific workspace or folder using the Tasks: Open User Tasks command....
Read more >
Troubleshooting Windows Subsystem for Linux | Microsoft Learn
File a documentation issue using the WSL docs repo. To contribute to the WSL docs ... Sometimes, you may hit "command not found"...
Read more >
How to fix Prettier Extension not working issue in VS CODE
How to fix Prettier Extension not working issue in VS CODE. ... Formatting your code is a waste of time - use Prettier...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found