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.

Yapf format sometimes doesn't work

See original GitHub issue

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 panel

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


workbench.main.js:sourcemap:10 spawn ctags ENOENT: Error: spawn ctags ENOENT
	at exports._errnoException (util.js:1050:11)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
	at onErrorNT (internal/child_process.js:367:16)
	at _combinedTickCallback (internal/process/next_tick.js:80:11)
	at process._tickCallback (internal/process/next_tick.js:104:9)
e.onUnexpectedError @ workbench.main.js:sourcemap:10
workbench.main.js:sourcemap:9 [Extension Host] (node:440) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ workbench.main.js:sourcemap:9
9workbench.main.js:sourcemap:9 [Extension Host] (node:440) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
t.log @ workbench.main.js:sourcemap:9
10workbench.main.js:sourcemap:9 [Extension Host] (node:440) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
t.log @ workbench.main.js:sourcemap:9
t._logExtensionHostMessage @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
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
workbench.main.js:sourcemap:9 [Extension Host] ApplicationInsights:Sender [Object]
t.log @ workbench.main.js:sourcemap:9
t._logExtensionHostMessage @ workbench.main.js:sourcemap:9
(anonymous) @ workbench.main.js:sourcemap:9
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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
toplinuxsircommented, Dec 14, 2017

The bug exist from version 0.5

0reactions
DonJayamannecommented, Jan 23, 2018

Thanks for getting back

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yapf formatter sometimes doesn't work · Issue #427 - GitHub
Environment data VS Code version: 1.9.0 Python Extension version: 0.9 Python Version: 3.6.1 OS and version: Debian linux 9.3 Actual behavior ...
Read more >
visual studio code - Format with yapf is silently erroring
Select entire file, cmd + shift + p, Format Code. Nothing happens :( It's possible I don't have some path/configuration set up correctly...
Read more >
My experience contributing YAPF formatter support to Pants 2.7
Pants will be careful to run each formatter sequentially, piping the results of one into the next so that they don't overwrite each...
Read more >
README.rst - platform/external/yapf - android Git repositories
indentations. YAPF will search for the formatting style in the following manner: 1. Specified on the command line.
Read more >
YAPF – A formatter for Python files | Hacker News
This looks horrible, and just right-aligns all your code into little columns. And doesn't work very well with nested function calls.
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