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. 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 …

  3. 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?

  4. 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, …

  5. python - Visual Studio Code Pylance (report Missing Imports ) - Stack ...

    Apr 19, 2022 · To anyone with a missing imports issue. If you have installed Pylance and Python extensions from VS Code, you should hover your mouse over the missing imports. Then, Pylance …

  6. 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 …

  7. 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 …

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

    Feb 1, 2021 · 13 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 …

  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. Visual Studio Code quick-fix & python - Stack Overflow

    Apr 8, 2019 · Visual Studio Code is never able to populate the 'Quick Fix' contextual drop down, only displaying 'No Code Actions Available' Python extension is installed, along with python3.7.3 and …