Opened 13 years ago
Closed 12 years ago
#448 closed defect (fixed)
SQLAlchemy session error [was: JPG upload fails]
Reported by: | Jakob Kramer | Owned by: | joar |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | programming | Keywords: | upload, submit |
Cc: | Parent Tickets: |
Description
After I had set up a completely fresh MediaGoblin development environment, started ./lazyserver
and created a new user account, I tried to upload a JPG file, but it failed with the attached error message.
I can upload PNG files, though. (And I am using the PIL from the package manager of Ubuntu (12.04). ;))
Attachments (2)
Change History (21)
by , 13 years ago
comment:1 by , 13 years ago
Priority: | major → blocker |
---|
comment:2 by , 13 years ago
This problem seems to exist with at least the JPG image I attached to this issue, but not with others.
comment:3 by , 13 years ago
Oh, maybe this has something to do with the issue #419 (“MediaGoblin can't handle (upload?) Large files”). I thought, “large files” were very large files (e.g. videos), but maybe they are big images (like mine…).
comment:4 by , 13 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:5 by , 13 years ago
Keywords: | upload submit added |
---|---|
Priority: | blocker → critical |
Resolution: | duplicate |
Status: | closed → reopened |
Seems to be another issue.
comment:6 by , 13 years ago
Priority: | critical → major |
---|---|
Summary: | JPG upload fails → SQLAlchemy session error [was: JPG upload fails] |
It looks like it isn't actually PIL or image processing related at all. The error shown here is an SQLAlchemy session error. Updating the title appropriately.
This ticket needs steps to reproduce the error though.
comment:7 by , 13 years ago
If you try to upload `this image <https://dl.dropbox.com/u/18835355/images/IMG_0139.jpg>`_ on a MediaGoblin site you will get this error message. I tried it on my local host and mediagoblin.com.
comment:8 by , 12 years ago
I am seeing the same error while uploading JPGs converted from RAW files. I'm not sure if it's related, but the exif data it's trying to insert doesn't look to be valid JSON - the strings should be wrapped in double quotes not single and the numbers shouldn't have the 'L' after them. Not sure why that would make SQL Alchemy throw Unicode errors though..
I'm not really a programmer but i'll see if I can work through how that exif data is extracted and see if I can cleanup the output.
comment:9 by , 12 years ago
JarlNicolson: I think this might have been resolved and I forgot to close it, but let's see. Could you try doing this:
./bin/easy_install -UaZ SQLAlchemy
Which should force an upgrade of sqlalchemy to the latest one. Then restart mediagoblin and see if you get the same error.
comment:10 by , 12 years ago
Unfortunately no luck - I actually only started playing with MediaGoblin yesterday so I already had the most up to date version of SQLAlchemy.
As a work around I can disable the detailed output from EXIF.py (in mediagoblin\tools\exif.py - change process_file(image) to process_file(image, details=False) ), it seems as though the hex values were only in the MakerNote EXIF data.
Unfortunately I got stuck trying to figure out what to do next - to me it seems like it could be a bug with the EXIF-py output, unescaped backslashes, but I'm very new at this :)
comment:11 by , 12 years ago
Okay, thanks for that information.
Could you upload an example image that breaks mediagoblin and attach it to this ticket? That might help if we can reproduce it.
by , 12 years ago
Attachment: | DSC_0608.JPG added |
---|
comment:12 by , 12 years ago
File attached. The image gandaro linked to also causes the problem for me (again, hex in a string inside the exif)
comment:13 by , 12 years ago
Owner: | set to |
---|---|
Status: | reopened → accepted |
comment:14 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Pushed a fix for this to master and tested it on https://gobblin.se!
comment:16 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It still does not work. Try with the image I referenced above.
comment:17 by , 12 years ago
I tried the two images (Mine and yours) in both a brand new local install and on https://gobblin.se - both were successful for me.
comment:19 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to gandaro:
I tried only on mediagoblin.com.
I'm don't think mediagoblin.com was updated at the time you tried. It might be now though, try again, otherwise ask cwebber to update. I'm closing this issue as fixed meanwhile :)
The error message