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.

An error message "Invalid path mode '\' in: No newline at end of file" pops up when for formatting document.

See original GitHub issue

Describe the bug

image

Steps to Reproduce

  1. Check Formatter (Tools/Options/Text Editor/Python/Formatting) is black (default)
  2. Type
######this is a comment
import os,sys;
spam( ham [ 1 ], { eggs : 2 } )
def foo    ():pass
x=1;y     =2;
y = 2
#comment no newline
  1. Go to Edit > Advanced >Format Document

Expected behavior

The package is successfully installed and the code is automatically formatted.

Additional context and screenshots

An error message pops up. This issue reproduced when set Tools/Options/Text Editor/Python/Formatting to black and autopep8, do not reproduce when set yapf.

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
AdamYoblickcommented, Sep 12, 2022

black and yapf are both broken in PTVS currently. I’m digging into this.

autopep8 formats as expected:

autopep8

0reactions
AdamYoblickcommented, Sep 12, 2022

I’ve fixed this particular issue, but it looks like we have other issues with the formatting code. I’m investigating.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Formatter black is not working on my VSCode...but why?
No formatting happens. It appears that black isn't working. Try running black from the command line to see if there are error messages....
Read more >
rsa - SSH Suddenly returning Invalid format
This stopped working without any changes. On a little thinking I replaced the "path to public key file" above with "path to private...
Read more >
Clang-Format Style Options — Clang 18.0.0git documentation
Clang-Format Style Options describes configurable formatting style options supported by LibFormat and ClangFormat. When using clang-format command line utility ...
Read more >
Errors while processing latex files
This web page tries to give some help with error messages that may pop up while processing your ... LaTeX Error: Command \end{itemize}...
Read more >
File.WriteAllLines Method (System.IO)
Creates a new file, writes one or more strings to the file, and then closes the file. ... path is invalid (for example,...
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