In traceback the error is in last line. Somehow it is trying to import something that is returning response as string. Can you kindly post your installed apps again and root urls.py in project directory. So I can compare urls and app imports side by side.
You said you have nothing in your app models so is there nothing at all in app? Regards, Mudassar On Mon, Aug 8, 2016 at 4:32 AM, Göran Uddeborg <goe...@uddeborg.se> wrote: > > Please makemigrations/migrate and restart server. It says its not getting > > proper data from wsgi.py. > > As my models.py is empty, I thought I didn't need to do any > migration. But I've done so now just in case. It doesn't seem to > change anything. > > > wsgi.py is not able to stream data to httpd because it has internal > issues. > > Yes, I understand it fails with a traceback. What I don't understand > is why it fails. > > > Also to see if project is working fine please always use runserver so > you can > > see django related errors. > > I briefly mentioned that. It works fine with runserver. No error > message, and the page is served fine. There is obviously something > different in the WSGI case. But what, I wonder. > > Most recent traceback from the httpd log: > > [Mon Aug 08 13:27:36.777315 2016] [wsgi:info] [pid 14003] [client > 62.65.125.225:51998] mod_wsgi (pid=14003, process='', application=' > www.uddeborg.se|/dyn'): Loading WSGI script '/var/www/dyn/dynsite/wsgi.py' > . > [Mon Aug 08 11:27:37.084022 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] mod_wsgi (pid=14003): Target WSGI script > '/var/www/dyn/dynsite/wsgi.py' cannot be loaded as Python module. > [Mon Aug 08 11:27:37.084100 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] mod_wsgi (pid=14003): Exception occurred processing > WSGI script '/var/www/dyn/dynsite/wsgi.py'. > [Mon Aug 08 11:27:37.084961 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] Traceback (most recent call last): > [Mon Aug 08 11:27:37.085025 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "/var/www/dyn/dynsite/wsgi.py", line 16, in > <module> > [Mon Aug 08 11:27:37.085030 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] application = get_wsgi_application() > [Mon Aug 08 11:27:37.085041 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File > "/usr/lib/python3.5/site-packages/django/core/wsgi.py", > line 13, in get_wsgi_application > [Mon Aug 08 11:27:37.085046 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] django.setup() > [Mon Aug 08 11:27:37.085055 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File > "/usr/lib/python3.5/site-packages/django/__init__.py", > line 18, in setup > [Mon Aug 08 11:27:37.085060 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] apps.populate(settings.INSTALLED_APPS) > [Mon Aug 08 11:27:37.085070 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "/usr/lib/python3.5/site- > packages/django/apps/registry.py", line 85, in populate > [Mon Aug 08 11:27:37.085075 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] app_config = AppConfig.create(entry) > [Mon Aug 08 11:27:37.085084 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "/usr/lib/python3.5/site- > packages/django/apps/config.py", line 116, in create > [Mon Aug 08 11:27:37.085089 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] mod = import_module(mod_path) > [Mon Aug 08 11:27:37.085098 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "/usr/lib64/python3.5/importlib/__init__.py", > line 126, in import_module > [Mon Aug 08 11:27:37.085103 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] return _bootstrap._gcd_import(name[level:], > package, level) > [Mon Aug 08 11:27:37.085112 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "<frozen importlib._bootstrap>", line 986, in > _gcd_import > [Mon Aug 08 11:27:37.085121 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "<frozen importlib._bootstrap>", line 969, in > _find_and_load > [Mon Aug 08 11:27:37.085131 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "<frozen importlib._bootstrap>", line 944, in > _find_and_load_unlocked > [Mon Aug 08 11:27:37.085140 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "<frozen importlib._bootstrap>", line 222, in > _call_with_frames_removed > [Mon Aug 08 11:27:37.085149 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "<frozen importlib._bootstrap>", line 986, in > _gcd_import > [Mon Aug 08 11:27:37.085158 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "<frozen importlib._bootstrap>", line 969, in > _find_and_load > [Mon Aug 08 11:27:37.085168 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] File "<frozen importlib._bootstrap>", line 956, in > _find_and_load_unlocked > [Mon Aug 08 11:27:37.085189 2016] [wsgi:error] [pid 14003] [client > 62.65.125.225:51998] ImportError: No module named > 'app\xc3\xa5\xc3\xa4\xc3\xb6' > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/22440.28123.900658.308986%40gargle.gargle.HOWL. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANoUts4qK--GqGoO5XEKkQvfTGXq47izMZH31uYT%2ByGa-mXKrg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.