Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while adding picture ... #50

Open
lowlow--- opened this issue Feb 24, 2016 · 3 comments
Open

Error while adding picture ... #50

lowlow--- opened this issue Feb 24, 2016 · 3 comments

Comments

@lowlow---
Copy link

Hi,

In lycheesync/lycheemodel.py the "if loop" from line 220:

if decode == "ISOSpeedRatings":
    self.exif.iso = value[0]

Throws the following error:

ERROR;2016-02-24 16:31:40,701; lycheesync.lycheesyncer; 'int' object is not subscriptable
Traceback (most recent call last):
File "/usr/local/lib/lycheesync/lycheesync/lycheesyncer.py", line 419, in sync
photo = LycheePhoto(self.conf, f, album)
File "/usr/local/lib/lycheesync/lycheesync/lycheemodel.py", line 221, in init
self.exif.iso = value[0]
TypeError: 'int' object is not subscriptable
ERROR;2016-02-24 16:31:40,703; lycheesync.lycheesyncer; could not add ...........

When value[0] is changed for value, the picture is successfully added.

if decode == "ISOSpeedRatings":
    self.exif.iso = value
@GustavePate
Copy link
Owner

Hi lowlow,

Looks like camera makers are not all very strict in their implementation of
the exif standard.

would it be a problem for you to send me a photo which cause this problem
so i can add it to my test cases ?

Thanks in advance !
Le 24 févr. 2016 16:56, "lowlow---" [email protected] a écrit :

Hi,

In lycheesync/lycheemodel.py the "if loop" from line 220:

if decode == "ISOSpeedRatings":
self.exif.iso = value[0]

Throws the following error:

ERROR;2016-02-24 16:31:40,701; lycheesync.lycheesyncer; 'int' object is
not subscriptable
Traceback (most recent call last):
File "/usr/local/lib/lycheesync/lycheesync/lycheesyncer.py", line 419, in
sync
photo = LycheePhoto(self.conf, f, album)
File "/usr/local/lib/lycheesync/lycheesync/lycheemodel.py", line 221, in
init
self.exif.iso = value[0]
TypeError: 'int' object is not subscriptable
ERROR;2016-02-24 16:31:40,703; lycheesync.lycheesyncer; could not add
...........

When value[0] is changed for value, the picture is successfully added.

if decode == "ISOSpeedRatings":
self.exif.iso = value


Reply to this email directly or view it on GitHub
#50.

@lowlow---
Copy link
Author

Hi GustavePate

After further investigation it appears to be linked to PIL library I'm using.
PIL 3.1.1 outputs exif values in a different way that the 3.0.0 version (which is mentioned in the requirement ...).
With 3.1.1 single value aren't any more returned as a tuple but are directly returned, i.e (int,) becomes int.

Sorry for the inconvenience.

@GustavePate
Copy link
Owner

Hi lowlow---,

Maybe I should upgrade to the latest pillow version then.

Thanks a lot for your bug report and analysis.
No inconvenience there.

Thanks again !

2016-02-25 10:09 GMT+01:00 lowlow--- [email protected]:

Hi GustavePate

After further investigation it appears to be linked to PIL library I'm
using.
PIL 3.1.1 outputs exif values in a different way that the 3.0.0 version
(which is mentioned in the requirement ...).
With 3.1.1 single value aren't any more returned as a tuple but are
directly returned, i.e (int,) becomes int.

Sorry for the inconvenience.


Reply to this email directly or view it on GitHub
#50 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants