'Django App works on PyCharm by not VS-code (File manage.py line 17 error)

I have a Django App that works well in PyCharm. All modules etc work. I need, however, to open the code in Visual Studio Code. However, when I execute a:

python manage.py runserver

command in visual studio code, I get the following error:

 File "manage.py", line 17
    ) from exc
         ^
SyntaxError: invalid syntax

I've scoured the resources - but I can't find any solution. I've re-installed python Django using PIP.. - still no luck. Yes, I've reactivated the VENV - it just so happens it is stuck in activated state - but im ok with that.

Any ideas ? Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source