About 50 results
Open links in new tab
  1. I'm getting an IndentationError (or a TabError). How do I fix it?

    Python 2 code indented with a mixture of tabs and spaces should be converted to using spaces exclusively. When invoking the Python 2 command line interpreter with the -t option, it issues …

  2. python - How do I automatically fix lint issues reported by pylint ...

    Feb 8, 2019 · Just like we have "eslint --fix" to automatically fix lint problems in Javascript code, do we have something for pylint too for Python code?

  3. How to fix Python indentation - Stack Overflow

    The code works as expected, but it's difficult to maintain. How can I fix the indentation (like HTML Tidy, but for Python) without breaking the code? Some editor-specific advice: Vi/Vim: Replace tabs with …

  4. Auto format flake8 linting errors in VSCode - Stack Overflow

    Sep 11, 2021 · I'm using the flake8 linter for Python and I have many code formats issues like blank line contains whitespace flake8(W293) I'm trying to auto fix these linting issues. I have these settings: &...

  5. VS Code can't find Python - Stack Overflow

    Feb 1, 2021 · 14 In Visual Studio Code, open the Settings with (Ctrl + ,) then search settings for "Interpreter". There will be an option for "Python: Default Interpreter Path". Set the location of your …

  6. How to fix 'Python is not recognized' error in VS Code terminal?

    Oct 12, 2025 · I'm using Visual Studio Code on Windows 10 and have Python installed, but when I run python in the integrated terminal, I get 'python' is not recognized as an internal or external command …

  7. What should I do with "Unexpected indent" in Python?

    179 Python uses spacing at the start of the line to determine when code blocks start and end. Errors you can get are: Unexpected indent. This line of code has more spaces at the start than the one before, …

  8. How do I autoformat some Python code to be correctly formatted?

    I have some existing code which isn't formatted consistently -- sometimes two spaces are used for indent, sometimes four, and so on. The code itself is correct and well-tested, but the formatting is …

  9. Visual Studio Code indentation for Python - Stack Overflow

    Jun 13, 2020 · How do I enable indentation in Visual Studio Code? I'm trying to learn Python (new to programming) and need auto-indentation. It worked with the first version I tried, but it doesn't indent …

  10. python - Why do I get a "ModuleNotFoundError" in VS Code despite …

    Jun 19, 2019 · Maybe Python path has not been updated in the VS code. Have you checked that? Perhaps closing all instances of VS code and then trying again might resolve the problem.