{"action":"created","issue":{"url":"https://api.github.com/repos/python-pillow/Pillow/issues/1755","repository_url":"https://api.github.com/repos/python-pillow/Pillow","labels_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1755/labels{/name}","comments_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1755/comments","events_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1755/events","html_url":"https://github.com/python-pillow/Pillow/issues/1755","id":137944999,"number":1755,"title":"Image.verify raises struct.error (instead of IndexError) on Pillow > 2.7.0","user":{"login":"melinath","id":299979,"avatar_url":"https://avatars.githubusercontent.com/u/299979?v=3","gravatar_id":"","url":"https://api.github.com/users/melinath","html_url":"https://github.com/melinath","followers_url":"https://api.github.com/users/melinath/followers","following_url":"https://api.github.com/users/melinath/following{/other_user}","gists_url":"https://api.github.com/users/melinath/gists{/gist_id}","starred_url":"https://api.github.com/users/melinath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melinath/subscriptions","organizations_url":"https://api.github.com/users/melinath/orgs","repos_url":"https://api.github.com/users/melinath/repos","events_url":"https://api.github.com/users/melinath/events{/privacy}","received_events_url":"https://api.github.com/users/melinath/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-02T17:52:08Z","updated_at":"2016-03-02T18:24:02Z","closed_at":null,"body":"```\r\nTraceback (most recent call last):\r\n  File \"daguerre/tests/unit/test_adjustments.py\", line 329, in test_adjust__broken\r\n    self.assertRaises(IndexError, image.verify)\r\n  File \"unittest/case.py\", line 475, in assertRaises\r\n    callableObj(*args, **kwargs)\r\n  File \"PIL/PngImagePlugin.py\", line 544, in verify\r\n    self.png.verify()\r\n  File \"PIL/PngImagePlugin.py\", line 163, in verify\r\n    self.crc(cid, ImageFile._safe_read(self.fp, length))\r\n  File \"PIL/PngImagePlugin.py\", line 142, in crc\r\n    crc2 = i16(self.fp.read(2)), i16(self.fp.read(2))\r\n  File \"PIL/_binary.py\", line 53, in i16be\r\n    return unpack(\">H\", c[o:o+2])[0]\r\nerror: unpack requires a string argument of length 2\r\n```\r\n\r\nSimilar to #1163 in form, but maybe not in cause."},"comment":{"url":"https://api.github.com/repos/python-pillow/Pillow/issues/comments/191359180","html_url":"https://github.com/python-pillow/Pillow/issues/1755#issuecomment-191359180","issue_url":"https://api.github.com/repos/python-pillow/Pillow/issues/1755","id":191359180,"user":{"login":"wiredfool","id":19792,"avatar_url":"https://avatars.githubusercontent.com/u/19792?v=3","gravatar_id":"","url":"https://api.github.com/users/wiredfool","html_url":"https://github.com/wiredfool","followers_url":"https://api.github.com/users/wiredfool/followers","following_url":"https://api.github.com/users/wiredfool/following{/other_user}","gists_url":"https://api.github.com/users/wiredfool/gists{/gist_id}","starred_url":"https://api.github.com/users/wiredfool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiredfool/subscriptions","organizations_url":"https://api.github.com/users/wiredfool/orgs","repos_url":"https://api.github.com/users/wiredfool/repos","events_url":"https://api.github.com/users/wiredfool/events{/privacy}","received_events_url":"https://api.github.com/users/wiredfool/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T18:24:02Z","updated_at":"2016-03-02T18:24:02Z","body":"The underlying implementation of the binary functions changed to `struct.unpack` at about 2.7 and every time that we throw a `struct.error` it's because of that change."}}