lycheesync
lycheesync copied to clipboard
Error while adding picture ...
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
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 https://github.com/GustavePate/lycheesync/issues/50.
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.
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 https://github.com/GustavePate/lycheesync/issues/50#issuecomment-188678653 .