Zulip manage.py syntax error accurs on running script

226 Views Asked by At

Fresh installation of Zulip on new Server. Installation went well and everything.

I want to use manage.py to do some things, but when I run something like

su zulip ./manage.py shell

But I get this error message:

./manage.py: line 2: syntax error near unexpected token `('
./manage.py: line 2: `from __future__ import (print_function)'

Does anyone have a idea what's wrong? Thanks in advance!

1

There are 1 best solutions below

0
Anders Kaseorg On

This is an incorrect usage of su; it caused su to launch bash ./manage.py shell, which tried to interpret manage.py as a Bash script. You meant one of these:

su zulip -c './manage.py shell'
sudo -u zulip ./manage.py shell