Django deploy on pythonanywhere, unhandled-exception error

I'm looking for help since I'm stuck with the deploy (for testing) of my django website. First deploy ever, so expect inaccuracies. I cannot view my site: when I click on the link I get a 'Something went wrong. There may be a bug in your code.Error code: Unhandled Exception". It is likely in wsgi code, since this is the error log and I get the same result putting IIPH.settings or Iiph.settings in wsgi file:

2025-07-06 21:14:54,888: ModuleNotFoundError: No module named 'IIPH' 2025-07-06 21:14:54,888: File "/var/www/mynickname_pythonanywhere_com_wsgi.py", line 26, in 2025-07-06 21:14:54,888: application = get_wsgi_application() 2025-07-06 21:14:54,888: 2025-07-06 21:14:54,888: File "/home/mynickname/.virtualenvs/env/lib/python3.13/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application 2025-07-06 21:14:54,889: django.setup(set_prefix=False) 2025-07-06 21:14:54,889: ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ 2025-07-06 21:14:54,889: 2025-07-06 21:14:54,889: File "/home/mynickname/.virtualenvs/env/lib/python3.13/site-packages/django/init.py", line 19, in setup 2025-07-06 21:14:54,889: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 2025-07-06 21:14:54,891: File "/home/mynickname/.virtualenvs/env/lib/python3.13/site-packages/django/conf/init.py", line 68, in _setup 2025-07-06 21:14:54,891: self._wrapped = Settings(settings_module) 2025-07-06 21:14:54,892: If you're seeing an import error and don't know why, 2025-07-06 21:14:54,892: we have a dedicated help page to help you debug: 2025-07-06 21:14:55,435: Error running WSGI application 2025-07-06 21:14:55,437: ModuleNotFoundError: No module named 'IIPH' 2025-07-06 21:14:55,437: File "/var/www/mynickname_pythonanywhere_com_wsgi.py", line 26, in 2025-07-06 21:14:55,438: application = get_wsgi_application() 2025-07-06 21:14:55,438: 2025-07-06 21:14:55,438: File "/home/mynickname/.virtualenvs/env/lib/python3.13/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application 2025-07-06 21:14:55,438: django.setup(set_prefix=False) 2025-07-06 21:14:55,438: ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ 2025-07-06 21:14:55,438: 2025-07-06 21:14:55,438: File "/home/mynickname/.virtualenvs/env/lib/python3.13/site-packages/django/init.py", line 19, in setup 2025-07-06 21:14:55,439: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 2025-07-06 21:14:55,439: ^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-06 21:14:55,439: 2025-07-06 21:14:55,439: File "/home/mynickname/.virtualenvs/env/lib/python3.13/site-packages/django/conf/init.py", line 81, in getattr 2025-07-06 21:14:55,439: self._setup(name) 2025-07-06 21:14:55,439: ~~~~~~~~~~~^^^^^^ 2025-07-06 21:14:55,440: 2025-07-06 21:14:55,440: File "/home/mynickname/.virtualenvs/env/lib/python3.13/site-packages/django/conf/init.py", line 68, in _setup 2025-07-06 21:14:55,440: self._wrapped = Settings(settings_module) 2025-07-06 21:14:55,440: ~~~~~~~~^^^^^^^^^^^^^^^^^ 2025-07-06 21:14:55,440: 2025-07-06 21:14:55,440: File "/home/mynickname/.virtualenvs/env/lib/python3.13/site-packages/django/conf/init.py", line 166, in init 2025-07-06 21:14:55,441: mod = importlib.import_module(self.SETTINGS_MODULE) 2025-07-06 21:14:55,441: ***************************************************

My app structure is: IIPH(where README is)/Iiph(where settings.py is)/various apps. I already have rebuilt the venv and installed requirements.txt. When I runserver from bash console, it gives no error, but I still cant view the site (though it might be normal) since apparently ports are already in use.

Apologies for the lenght, neverending thanks in advance to whoever can help.

Вернуться на верх