skip to Main Content

I have a new computer at work and I am setting up Visual Studio Code.

I write a simple function in the editor and send it to terminal, I get the following error:

IndentationError: unexpected indent

enter image description here

I tried to remove indentation in formula definition of editor, and it worked:

enter image description here

Is there something I can do to correct this issue, as it will wreak havoc on more complex functions and loops

EDIT:
according to https://github.com/microsoft/vscode-python/issues/24256, python 3.13 is buggy in vscode

moved to python 3.12, and it worked

2

Answers


  1. Chosen as BEST ANSWER

    according to https://github.com/microsoft/vscode-python/issues/24256, python 3.13 is buggy in vscode

    moved to python 3.12, and it worked


  2. This is a known CPython issue on Windows (it has nothing to do with Visual Studio Code): https://github.com/python/cpython/pull/124119

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search