Forums

My site does not show and there is no errors in the log files

I used Flask and python 2.7 for my site, which works locally on my computer.

My site is called nos.pythonanywhere.com. When I open the link in a browser, it shows hello from flask! but where is no errors in the log files.

When I open the nos_pythonanywhere_com_wsgi.py file, there is a little problem logo next to the following line

from manage import app as application

and it says: 'application imported but unused'

Can anyone shine some light on this? Many thanks.

For some reason, the manage.py was overwritten. Now I can see errors in the error log.

2016-09-23 01:37:47,168 :Error running WSGI application
Traceback (most recent call last):
File "/bin/user_wsgi_wrapper.py", line 154, in __call__
app_iterator = self.app(environ, start_response)
File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application
raise e
ImportError: cannot import name ProfileForm

How shall I proceed from this? Thanks for your help.

I finally found the problem, which is stupid. I mistakenly uploaded a wrong file.

From the pythonanywhere console, you can run

python2.7 -i /var/www/www_nos_pythonanywhere_com_wsgi.py

to see detailed errors (more than the error log). Remember to change the site name to your site name.