1

So I set up my django and it seemed to be working fine until I noticed my admin panel would not be styled with css. I also could not access one of my views via url getting an Internal Server Error. The Apache Error Log looks like this but I dont really get what I messed up.

[Sun Jun 26 19:46:29.256896 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502] mod_wsgi (pid=19419): Failed to exec Python script file '/home/pi/myproject/myprojectenv/myproject/myproject/wsgi.py'.
[Sun Jun 26 19:46:29.257249 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502] mod_wsgi (pid=19419): Exception occurred processing WSGI script '/home/pi/myproject/myprojectenv/myproject/myproject/wsgi.py'.
[Sun Jun 26 19:46:29.257906 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502] Traceback (most recent call last):
[Sun Jun 26 19:46:29.258141 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502]   File "/home/pi/myproject/myprojectenv/myproject/myproject/wsgi.py", line 16, in <module>
[Sun Jun 26 19:46:29.258201 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502]     application = get_wsgi_application()
[Sun Jun 26 19:46:29.258274 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502]   File "/home/pi/myproject/myprojectenv/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Jun 26 19:46:29.258324 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502]     django.setup(set_prefix=False)
[Sun Jun 26 19:46:29.258458 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502]   File "/home/pi/myproject/myprojectenv/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
[Sun Jun 26 19:46:29.258508 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502]     apps.populate(settings.INSTALLED_APPS)
[Sun Jun 26 19:46:29.258575 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502]   File "/home/pi/myproject/myprojectenv/lib/python3.7/site-packages/django/apps/registry.py", line 83, in populate
[Sun Jun 26 19:46:29.258627 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502]     raise RuntimeError("populate() isn't reentrant")
[Sun Jun 26 19:46:29.258740 2022] [wsgi:error] [pid 19419] [client 192.168.2.138:61502] RuntimeError: populate() isn't reentrant

Edit: I should add: I never changed something in the wsgi.py file

Ric
  • 103
  • 6
  • Try running `manage.py check`, it may give you some information as it looks like a Django configuration issue – Iain Shelvington Jun 26 '22 at 19:53
  • identified no issue.. – Ric Jun 26 '22 at 20:04
  • @IainShelvington could you take a look at this post and suggest something to check? thanks. https://stackoverflow.com/questions/73263626/django-served-with-apache-how-to-set-pythonpath – Shiping Aug 11 '22 at 13:49

0 Answers0