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.

Error while formating document in VS Code

See original GitHub issue

I installed extension in VS Code and GDTollkit with pip3. Formating with GDToolkit works in terminal, but when trying to run in VS Code, it throws an error: ImportError: No module named gdtoolkit.formatter.

I work on macOS 10.15.5

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
Razoric480commented, Sep 14, 2020

@F0rsaken Okay, make sure of the following:

  1. Open Code -> Preferences
  2. Search for Python Path
  3. Make sure it’s set to python3 and not python

The default python on macOS is assigned to python 2, but you installed it with pip3 (and GDtoolkit requires python 3.) So when VSCode tries to use the python runtime, it’s running it with python2 and is unable to find GDToolkit, and tells you as much.

If you can’t find the Python Path setting, make sure to install the Python extension.

1reaction
Razoric480commented, Sep 14, 2020

I do

blows dust off of it

I’ll take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notifying the user of "Error formatting document" #1419 - GitHub
I have the VS Code with the Prettier extension installed. I'm always frustrated when I don't know why my code is not formatted...
Read more >
Visual Code Formatting Error - Stack Overflow
Currently i have a "error" in my code formatting after updating vs code (1.15.1). When i write a if statement and try to...
Read more >
How to fix Prettier Extension not working issue in VS CODE
How to fix Prettier Extension not working issue in VS CODE. ... How to Format Code Automatically with Prettier and VS Code. Tomasz...
Read more >
Documentation for Visual Studio Code
Optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux,...
Read more >
JavaScript Programming with Visual Studio Code
Visual Studio Code includes built-in JavaScript IntelliSense, debugging, formatting, code navigation, refactorings, and many other advanced language features.
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