Hi,

Well I'm injecting zipped libraries into the sys.path like this:

import sys
from glob import glob
from os import path
################################################################################
# import the libraries
################################################################################
root_path = path.abspath(path.dirname(__file__))
libz      = glob(path.join(root_path, 'libz', '*.zip'))
for lib in libz:
    sys.path.insert(0,lib)

################################################################################
# imports
################################################################################
from google.appengine.ext.webapp.util import run_wsgi_app
from werkzeug import BaseRequest, BaseResponse, responder


Now the weird part is that sometimes it works flawlessly and sometimes
it does not... and gives me the following
error:

zipimporter('/base/data/home/apps/journal-ma/
reflection-2.330732104263667843/libz/jinja2.zip', '')
zipimporter('/base/data/home/apps/journal-ma/
reflection-2.330732104263667843/libz/werkzeug.zip', '')
<type 'exceptions.ImportError'>: cannot import name BaseRequest
Traceback (most recent call last):
  File "/base/data/home/apps/journal-ma/
reflection-2.330732104263667843/main.py", line 17, in <module>
    from werkzeug import BaseRequest, BaseResponse, responder
<type 'exceptions.ImportError'>: cannot import name BaseRequest

It looks like both libraries werkzeug and jinja2 got imported by the
zipimporter but trying to import from them
raises an ImportError.

Can someone shed some light into this, why it's happening and how to
fix it?

regards,
 Moritz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to