My problem seems to be that the jpeg decoder isn't being found. Adding my own debug messages to the PIL library Images.py, I get these messages: >From products/fields.py, calling Image.open(), followed by the Image.load() call, get these messages. The Image.load() fails because a jpeg decoder isn't found. init() inside Image.py has been called, I verified that.
DEBUG: Image.open() #1 returning fp %s filename %s <cStringIO.StringI object at 0x7d1c08> DEBUG: fields.ImageField: Image.open(file) JPEG succeeded. DEBUG: class: Image.load: self self.im self.palette <PIL.JpegImagePlugin.JpegImageFile instance at 0x17a2cb0> None None DEBUG: Image.load(): self %s: dropped through. <PIL.JpegImagePlugin.JpegImageFile instance at 0x17a2cb0> DEBUG _getdecoder: decoder jpeg not available._decoder DEBUG: fields.ImageField: PIL exception on image [20/Mar/2010 13:11:29] "POST /admin/product/productimage/4/ HTTP/1.1" 200 9952 [20/Mar/2010 13:11:30] "GET /static/css/blackbird.css HTTP/1.1" 200 6392 [20/Mar/2010 13:11:30] "GET /static/js/blackbird.js HTTP/1.1" 200 10291 [20/Mar/2010 13:11:30] "GET /static/js/jquery.js HTTP/1.1" 200 100196 [20/Mar/2010 13:11:30] "GET /admin/jsi18n/ HTTP/1.1" 200 803 * * * * * So it seems to be some sort of install or config problem, but I've reinstalled to check that. Any tips greatly appreciated - Thanks! On Mar 19, 11:57 am, haikuukiah <[email protected]> wrote: > It seems the problem has to do with confusion over paths to "static" > files. > The whole MEDIA_ROOT, MEDIA_URL fiasco. > I've been tracking it down for 24 hours and while closer maybe, > haven't fixed it. > > Two questions I have now: > 1. Why is my server started twice > 2. What module is mangling the path? > > For 1, I get this message on startup, with some DEBUG comments that > I've added in settings.py and local_settings.py > python manage.py runserver --noreload > ('settings.py: DIRNAME is %s', '/Users/<mypath>/mystore') > ('local_settings.py: DIRNAME is %s', '/Users/<mypath>/mystore') > Fri, 19 Mar 2010 10:49:22 root INFO BlueBear Started > ('DEBUG: Calling execute_manager from manage.py, __name__ is %s', > '__main__') > ('settings.py: DIRNAME is %s', '/Users/r<mypath>/mystore/../mystore') > ('local_settings.py: DIRNAME is %s', '/Users/<mypath>/mystore/../ > mystore') > Fri, 19 Mar 2010 10:49:22 root INFO BlueBear Started > > Coment ^^^^^ At this point, the store has been started twice, inside > django/core/commands/__init.py__, > and the DIRNAME variable has been tweaked. I have tried to remove all > mangling of DIRNAME in manage.py, settings.py, and local_settings.py, > so that the only line setting it is at the top of settings.py: > DIRNAME = os.path.dirname(__file__) > > Validating models... > [*snip*] > 0 errors found > > On (2) - When go to the admin interface, products, and add an image, I > get the same error as first reported, > "Upload a valid image ..." > What I've found is that a directory is created by this admin action, > which is my pathname concatenated three times. Not kidding: > > /Users/r<mypath>/mystore/static/Users/<mypath>/mystore/static/Users/ > <mypath>/mystore/static/images > > I delete the whole path under the first <mypath>/mystore, and it is > recreated by attempting to add an image. > This is pretty ridiculous. I've been chasing this down into > django.core, found the module execute_manager, the command 'runserver' > and the settings manipulation. > It seems I shouldn't be debugging in django core, and so far have > failed to figure out how this incorrect path was created. > > First question I guess is: why is the server start being called > twice? Even with --noreload. > > Any and all help is greatly appreciated. > > On Mar 18, 11:38 am, franck bret <[email protected]> wrote: > > > the library used by satchmo for managing image is PIL. > > Be sure your PIL version works fine. > > Try to convert image from command > > line...http://www.pythonware.com/library/pil/handbook/introduction.htm > > > 2010/3/18 haikuukiah <[email protected]>: > > > > Hi, > > > First post, diving in. > > > When I attempt to add an image to a product (admin i/f) consistently > > > get the error: > > > "Upload a valid image. The file you uploaded was either not an image > > > or a corrupted image." > > > > Have tried .jpg files with and without alpha channel, copied images > > > off other websites, nothing succeeds. > > > I'm sure this is simple. Newbie here, first use of Satchmo. > > > Thanks. > > > -Richard > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Satchmo users" 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 > > > athttp://groups.google.com/group/satchmo-users?hl=en. > > > -- > > Franck Bret > > --------------------- > > 06 03 90 65 98 > > Fax : 09 59 95 85 96 -- You received this message because you are subscribed to the Google Groups "Satchmo users" 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/satchmo-users?hl=en.
