Forums

ImportError: No module named...

Hello.

I am new to django and pythonanywhere; and creating websites in general. I was following the django-girls tutorial, and everything went fine, my app was running online like two days ago. Today I entered to continue with the tutorial, but now in the Web tab, it won't let me reload my app, and it displays:

"There is a problem with your virtualenv setup. Look at the virtualenv section below for details. "

Although there's no further information in the virtualenv section, the error log displays:

2017-12-29 18:48:37,913: Error running WSGI application
2017-12-29 18:48:37,923: ImportError: No module named 'noobnb1029_pythonanywhere_com_wsgi'

several times. Nothing else, no traceback.

The server log displays, among other things:

2017-12-29 18:46:59 unable to stat() /var/www/noobnb1029_pythonanywhere_com_wsgi.py, events will be triggered as soon as the file is created

Apparently, there's something wrong when Pythonanywhere tries to access my var/www/noobnb1029_pythonanywhere_com_wsgi.py file . But I don't know why, if everything was fine before.

I've followed the advices given in the debugging tutorial but everything seems fine. When I access the var/www/noobnb1029_pythonanywhere_com_wsgi.py manually in the console it looks fine, it runs, and the interactive (python -i) mode works as excpected. My virtualenv also activates correctly in the console, and everything else seems to work fine.

Still, I guess the problem is not inside the <mydomain>wsgi.py file, but rather in whatever other file is importing that file in the first place, cause the error says that it can't find the 'noobnb1029_pythonanywhere_com_wsgi' module. But since it doesn't offer any traceback, I don't know where to look up.

Please, help.

And thanks a lot!

If you're and admin, you can look inside my files, it's really a basic app. Thanks!

I've just seen that two other people have posted the same error I have, while I was writing my post:

https://www.pythonanywhere.com/forums/topic/12242/

https://www.pythonanywhere.com/forums/topic/12241/

Is there, then, a problem with PythonAnywhere going on right now, happening to several users?

Same thing happened to me, glad I'm not the only one who can't figure it out.

Same thing happened to me...

Sorry about that, we had a problem with one of our webservers' connection to the file server your code is stored on. It was sorted out not long after you posted this forum thread -- let us know if you're still seeing problems.