Forums

WSGI can't find a module.

Hi there,

Had code working today, but pushed a new release and looks like something went worng, i trhied to fix it....but nothig works.. When I try to run python2.7 -i /var/www/www_greentool_org_wsgi.py it shows me next error ImportError: No module named greentool.

My WSGI IS:

path = '/home/greentool/greentool/'

from greentool import app as application

Here how is my File directory looks like enter image description here

UPDATE: Looks like it fnally imported a module. What I changed: Changed WSGI path to path = '/home/greentool/'

But I got another problem. Dircetories portal and site inside the greentool module are actually modules too(as a blueprints).. in _ init _.py I import them as greentool.site, here what I get after running a WSGI: ImportError: No module named site.views*

Any suggestions? Thank you in advance!

Could you give the full stack trace? That is, not just the last line with the error message, but the lines showing the code path to the point that's generating the error.

Looks like the stack trace from error.log got deleted(for this issue). I fixed it by changing the working directort. Before it was '/home/greentool/' I changed it to '/home/greentool/greentool/' in the WebApps tab.

Thank you.

OK -- glad you worked out the problem!