I have Python 3.9 (/usr/bin/python3.9)
with Django 3.1.6 and with Apache2 want to run my application.
But on the browser is error 500 Internal Server Error and in log of Apache I'm getting SyntaxError in datetime.py:
mod_wsgi (pid=25852): Target WSGI script '/path/to/wsgi.py' cannot be loaded as Python module.
mod_wsgi (pid=25852): Exception occurred processing WSGI script '/path/to/wsgi.py'.
Traceback (most recent call last):
File "/path/to/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
File "/usr/lib/python3.9/site-packages/django/__init__.py", line 1, in <module>
from django.utils.version import get_version
File "/usr/lib/python3.9/site-packages/django/utils/version.py", line 1, in <module>
import datetime
File "/usr/lib/python3.9/datetime.py", line 889
raise ValueError(f'Invalid isoformat string: {date_string!r}')
^
SyntaxError: invalid syntax