Syntax Error in manage.py


#1

I’m having a issue with my manage.py file. When I try to run a command like “$ python manage.py runserver” or “$ python manage.py createsuperuser”, I’m getting this error:

File “manage.py”, line 14
) from exc
^
SyntaxError: invalid syntax

Everything was running as expected before. I’m (hopefully) missing a step somewhere, but I can figure it out. Any assistance is greatly appreciated!


#2

Are you within your virtual environment? You should see something at the start of your command line like (venv) :)


#3

Looks like I’m not in the virtual environment, I must have shut it down. How do I restart it?

I figured it out and I’m back up and running. The terminal side of thing is where I’m least comfortable. I have a hard time aligning the commands and what’s going on behind the scenes.

Thanks, your comment nudged me in the right direction!


#4

No problem — I promise things will become more natural the more you do it. :)

Feel free to bookmark this for later: https://hellowebbooks.com/setup/#start-virtualenv

Also! If you want to play more in the command line, I have a free learn-command-line zine here: http://hellowebbooks.com/learn-command-line/

Good luck!