I am running django with mod_wsgi/apache and receive this ImportError:
Request Method: GET
Django Version: 1.2.5
Exception Type: ImportError
Exception Value:
No module named adspygoogle.dfp.DfpClient
This module is inside my django app/libs directory, which is included in the python path.
Strangely, when using ./manage.py shell or ./manage.py runserver with pdb.set_trace(), dropping into the debugger just before the import, I am able to import the module without any problems.
Does anyone have any idea what could be causing this?
It turned out the
libs/adspygoogledirectory had somehow become dirty in a way that git hadn’t tracked. I replaced it with a fresh checkout and it now works…I still can’t explain why I could import it in the shell or with runserver.