photo / import

Import tool companion for all of the export tools
http://theopenphotoproject.org
Apache License 2.0
16 stars 11 forks source link

All photos returning 500 Unknown Error #13

Closed barnabywalters closed 12 years ago

barnabywalters commented 12 years ago

When trying to import 93 photos (JSON from flickr-export) I get FAILED: 500 - An unknown error occurred. for every single one.

Sample output:

Processing 93 of 93 20111111T000358-6332826962.json ... FAILED: 500 - An unknown error occurred.
{u'description': u'The fully carved heel and inner heel, with the offcuts against them.\n\nMore information + sound clips of this guitar at <a href="http://waterpigs.co.uk/lutherie/catalogue/acoustic-guitars/001/" rel="nofollow">waterpigs.co.uk/lutherie/catalogue/acoustic-guitars/001/</a>', u'license': u'', u'tags': u'', u'dateUploaded': 1320955438, u'photo': None, u'title': u'2 Nov 2011 17:40', u'dateTaken': 1320912238, u'permission': True, u'id': u'6332826962'}

It's not a problem with the oauth tokens (I've tried with invalid tokens and get an error 403).

Running under debian (the same server the app is hosted on, if that makes any difference)

jmathai commented 12 years ago

Do you have a pro account? I'm not seeing the url to the photo itself.

u'photo': None

barnabywalters commented 12 years ago

Nope, no pro account. I didn't realise that was required (only reference to it I can find is a mention in the issues for export-flickr).

jmathai commented 12 years ago

We're sourcing the original but we need to fall back to the highest resolution.I merged a pull request that does this. Do you mind rerunning the export and see if a URL is present?

https://github.com/openphoto/export-flickr/pull/10

barnabywalters commented 12 years ago

Thanks, that's worked great (only errored on one (no idea why) and I didn't want that photo anyway). I had to manually set permissions=1 to make them public (thought it hadn't worked at first).

Now I have the slight problem that I cannot log in to openphoto (my password field has actually gone blank in the op_user table! It worked half an hour earlier)

jmathai commented 12 years ago

I think you may have found a bug :) -- Investigating.

barnabywalters commented 12 years ago

Looks to be that way :)

Is there an easy way to generate the value for the password field? Looking at the source shows it's sha('password' . 'salt') but I can't figure out what the salt is/where it comes from exactly.

jmathai commented 12 years ago

The default value is in /src/configs/defaults.ini

barnabywalters commented 12 years ago

I assume I should have changed it from "salt_for_passwords"?

jmathai commented 12 years ago

Technically, yes :). But you can change it now, generate the password and store it and it'll validate accordingly. The password field is about a 2 day old feature.

barnabywalters commented 12 years ago

Woo hoo! It works. Thanks a lot. Exemplary service :)