Thanks Nick for your reply. Is the python module search path different in production, than a standard client install? Because on my local machine, the current directory is first in the search path, and "import profile" from within the SDK loads profile.py from my project.
Thanks again. On Jul 6, 2:06 am, "Nick Johnson (Google)" <[email protected]> wrote: > Hitechboy, > > It's not a sandboxing issue - it's all down to the Python search path. > System directories are listed before your own source directories, so > it searches them first. You can change it by modifying sys.path if you > wish. > > -Nick Johnson > > > > > > On Mon, Jul 6, 2009 at 5:12 AM,techboy<[email protected]> wrote: > > > The problem appears to be that the file in my project is named > > profile.py. There is also a profile.py in the python distribution > > itself. > > > I'm assuming that it is a sandboxing restriction(?), that I can't > > import my own profile.py in production (even though it works fine in > > the dev appserver). > > > In production, > > > import profile > > print profile.__file__ > > > Shows it is the profile from the python library. > > > On Jul 5, 12:29 pm,techboy<[email protected]> wrote: > >> I have a webapp.RequestHandler derived class called Profile, in a file > >> profile.py. It operates correctly locally. When I deploy to > >> production, it fails. If I simply rename the class to a different > >> name, it works in production. > > >> The logs show this for the failure case. > > >> <type 'exceptions.AttributeError'>: Profile instance has no attribute > >> 'initialize' > >> Traceback (most recent call last): > >> <...snip...> > >> File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > >> util.py", line 76, in run_wsgi_app > >> result = application(env, _start_response) > >> File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > >> __init__.py", line 491, in __call__ > >> handler.initialize(request, response) > > >> I can work around this problem obviously but I wonder if anyone could > >> speculate why is happening. > > -- > Nick Johnson, App Engine Developer Programs Engineer > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration > Number: 368047 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
