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

ifd_maker_note may raise error if exif_file.make is not set yet #21

Open
acenqiu opened this issue Aug 19, 2015 · 5 comments
Open

ifd_maker_note may raise error if exif_file.make is not set yet #21

acenqiu opened this issue Aug 19, 2015 · 5 comments

Comments

@acenqiu
Copy link

acenqiu commented Aug 19, 2015

There is a possibility that MakerNote section is in front of Make section, which will raise an exception as follows:

AttributeError: ExifSegment instance has no attribute 'make'

Example photo links:

http://d3drsuq3xbnvq3.cloudfront.net/jp/pictures/201501/536906316/61e48289a1854983abba557ec1c6724c.jpeg

http://d3drsuq3xbnvq3.cloudfront.net/jp/pictures/201507/536906316/212a0c03410f5ed53c0ff8150216b10a.jpeg

@acenqiu
Copy link
Author

acenqiu commented Aug 19, 2015

A possible workaround is just skip this section.

def ifd_maker_note(e, offset, exif_file, mode, data):
    try:
        exif_file.make
    except AttributeError:
        msg = "Haven't got make yet. Skipping."
        raise JpegFile.SkipTag(msg)

    # ...
end

@mcrichards
Copy link

I confirm the above fix works

@gabn88
Copy link

gabn88 commented Jan 16, 2017

It would be cool if this could be put on pypi.

But it is cool anyway that the fix is here to apply manually :)

@abaldwin1
Copy link

Is anyone addressing this? I can confirm that christophlingg's code in commit
komoot@b6f4251 works

@witekdev
Copy link

witekdev commented Jun 15, 2018

Thanks for the fix, would be great to have this fix released. Meanwhile we have to 🐒 patch

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

No branches or pull requests

5 participants