Take the 2-minute tour ×

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?

share|improve this question
add comment

2 Answers

Set the python path for the wsgi process.


share|improve this answer
I'm using daemon mode, so I added the python-path as follows: WSGIDaemonProcess example.com python-path=/path/to/mysite.com:/path/to/venv/lib/python2.7/site-packages No luck unfortunately. –  DanS Jul 13 '12 at 14:32
add comment
up vote 0 down vote accepted

It turned out the libs/adspygoogle directory 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.

share|improve this answer
add comment

Your Answer


