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
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)
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
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-
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
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
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