Opened 11 years ago
Closed 10 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). ;))
Subtickets
Attachments (2)
Change History (21)
Changed 11 years ago by
comment:1 Changed 11 years ago by
Priority: | major → blocker |
---|
comment:2 Changed 11 years ago by
This problem seems to exist with at least the JPG image I attached to this issue, but not with others.
comment:3 Changed 11 years ago by
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 Changed 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:5 Changed 11 years ago by
Keywords: | upload submit added |
---|---|
Priority: | blocker → critical |
Resolution: | duplicate |
Status: | closed → reopened |
Seems to be another issue.
comment:6 Changed 11 years ago by
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 Changed 11 years ago by
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 Changed 11 years ago by
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 Changed 11 years ago by
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 Changed 11 years ago by
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 Changed 11 years ago by
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.
Changed 11 years ago by
Attachment: | DSC_0608.JPG added |
---|
comment:12 Changed 11 years ago by
File attached. The image gandaro linked to also causes the problem for me (again, hex in a string inside the exif)
comment:13 Changed 11 years ago by
Owner: | set to joar |
---|---|
Status: | reopened → accepted |
comment:14 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Pushed a fix for this to master and tested it on https://gobblin.se!
comment:16 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It still does not work. Try with the image I referenced above.
comment:17 Changed 10 years ago by
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 Changed 10 years ago by
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