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

UnboundLocalError: local variable 'photoshop' referenced before assignment #3772

Closed
kyamagu opened this issue Apr 5, 2019 · 4 comments
Closed

Comments

@kyamagu
Copy link

kyamagu commented Apr 5, 2019

The following line throws an UnboundLocalError.

self.info["photoshop"] = photoshop

Apparently, this if-else condition does not cover all the cases.

if s[:14] == b"Photoshop 3.0\x00":

@radarhere
Copy link
Member

This is a duplicate of #3769

@radarhere
Copy link
Member

I don't suppose that the image that you found this issue with is one that you are able to provide for inclusion in the test suite under Pillow's license?

@kyamagu
Copy link
Author

kyamagu commented Apr 5, 2019

@radarhere You can include the following small JPG in the test suite. The file is extracted from Adobe PSD file's thumbnail resource.

example

BTW: I'm the author of psd-tools. Thanks for maintaining the great tool!

@radarhere
Copy link
Member

@kyamagu thanks, and thanks for the image

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