[google-appengine] Re: Access to module file denied (PIL)

2009-02-25 Thread Matthew Blain
Is 'img_folder' a static file? If so, you can't access it directly using 'open'. "For efficiency, App Engine stores and serves static files separately from application files. Static files are not available in the application's file system. If you have data files that need to be read by the applic

[google-appengine] Re: Access to module file denied (PIL)

2009-02-23 Thread Mladen Stanojevic
But, what if I want to use already uploaded image file, not images from DB?? This code produces BadImageError: img_path = os.path.join(os.path.abspath(os.path.dirname (__file__)), 'img_folder', 'img_file_name') img_blob = db.Blob(open(img_path).read()) img = images.Image(img_blob)

[google-appengine] Re: Access to module file denied (PIL)

2009-02-12 Thread Matthew Blain
Good to hear. Is the PIL issue still occurring? Does it happen for all apps? Does the images-demo sample app in http://code.google.com/p/google-app-engine-samples/ (it's there but there's no archive for it) work? --Matthew On Feb 10, 9:24 pm, Ian Lewis wrote: > I found that this seems unrelat

[google-appengine] Re: Access to module file denied (PIL)

2009-02-10 Thread Ian Lewis
I found that this seems unrelated to the message about the PIL module and was related to the local datastore I was using. On Wed, Feb 11, 2009 at 12:36 PM, Ian Lewis wrote: > Matthew, > > I also wanted like to mention that this happens to me on every request > which is why I suspected appengine-

[google-appengine] Re: Access to module file denied (PIL)

2009-02-10 Thread Ian Lewis
Matthew, I also wanted like to mention that this happens to me on every request which is why I suspected appengine-django. I don't actually import the image api unless I am saving a profile image. On Wed, Feb 11, 2009 at 11:34 AM, Ian Lewis wrote: > Matthew, > > I'm using the images api. Up unt

[google-appengine] Re: Access to module file denied (PIL)

2009-02-10 Thread Ian Lewis
Matthew, I'm using the images api. Up until 1.1.9 my understanding was that importing PIL wouldn't work in production (and with 1.1.9 it's enforcing it on the dev_server?). Let me pull out the code here, models.py class UserProfileImage(db.Model): user = db.ReferenceProperty(UserProperties, re

[google-appengine] Re: Access to module file denied (PIL)

2009-02-10 Thread Matthew Blain
Hello Ian, How are you accessing PIL? Are you using the Images API* , or are you importing from PIL directly? --Matthew * http://code.google.com/appengine/docs/python/images/ On Feb 10, 5:47 am, Ian Lewis wrote: > I'm getting an error similar to the errors about not being able to access > skipp