Django Install failed: SyntaxError: invalid syntax

Just upgraded to Virtualmin pro and trying to run the Django install script on a newly created sub-domain. I had some troubles with the database, it didn’t want to initialize so I installed PSQL via SSH command line, ran through the debugging and then forced a cert update for the default snakeoil SSL cert that was failing. That fixed PSQL, but now I’m facing this error. I tried searching but there’s not much info about this out there.

Found in cache ..
Found in cache ..

Now installing Django version 4.0.4 ..

    DB initialization install failed :

    Traceback (most recent call last):
      File "", line 22, in <module>
      File "", line 18, in main
      File "/home/innovated/domains/", line 446, in execute_from_command_line
      File "/home/innovated/domains/", line 386, in execute
      File "/home/innovated/domains/", line 87, in __getattr__
      File "/home/innovated/domains/", line 74, in _setup
        self._wrapped = Settings(settings_module)
      File "/home/innovated/domains/", line 183, in __init__
        mod = importlib.import_module(self.SETTINGS_MODULE)
      File "/usr/lib/python3.8/importlib/", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
      File "<frozen importlib._bootstrap>", line 991, in _find_and_load
      File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 844, in exec_module
      File "<frozen importlib._bootstrap_external>", line 981, in get_code
      File "<frozen importlib._bootstrap_external>", line 911, in source_to_code
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/innovated/domains/", line 80
        'PASSWORD': ''BbMLrqkrquxHZWp3'',
    SyntaxError: invalid syntax

    More information on using this script can be found at

.. installation was only partially complete.
OS type and version Ubuntu Linux 20.04.4
Virtualmin version 6.17-3 Pro

As a note, I’m database ambiguous in this situation so it worked with MySQL, just not PostgreSQL


I have given it a quick test and installation worked for me just fine. What is PostgreSQL database password for that virtual server set to?

maybe password needs to be inside single quote, not 2 single quotes (?)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.