I have django 1.5 running on the Google App Engine using the djangoappengine module for stitching. Everything works fine, except that about half of the calls to / _ah / queue / offfer raise the following import error:
Traceback (most recent call last): File "..../third_party/djangoappengine/deferred/handler.py", line 2, in <module> from djangoappengine import main ImportError: No module named djangoappengine
As you can see, the djangoappengine module is inside the third_party directory, and this directory is added to sys.path in the appengine_config.py file, so there should not be any problems doing from djangoappengine import main :
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'third_party'))
Corresponding line in app.yaml :
handlers: - url: /_ah/queue/deferred script: third_party/djangoappengine/deferred/handler.py login: admin
What causes these sporadic import errors? Am I doing something wrong? Maybe there is an import cycle that I don't know about?
source share