-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix Python runtime error #72
Conversation
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Hi Stefan, First of all many thanks for the patch! Could you perhaps supply a JP2 that produces the error you're reporting, as that would help me to review the patch. BTW I'm in the middle of some major computer crisis at the moment (main development machine utterly fried), so it may take me a while to have a proper look at this. |
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This error was reported while validating some JP2 files: Traceback (most recent call last): File "/usr/local/lib/python3.2/dist-packages/jpylyzer/jpylyzer.py", line 631, in <module> main() File "/usr/local/lib/python3.2/dist-packages/jpylyzer/jpylyzer.py", line 627, in main checkFiles(args.inputRecursiveFlag, args.inputWrapperFlag, jp2In) File "/usr/local/lib/python3.2/dist-packages/jpylyzer/jpylyzer.py", line 553, in checkFiles xmlElement = checkOneFile(path) File "/usr/local/lib/python3.2/dist-packages/jpylyzer/jpylyzer.py", line 268, in checkOneFile "JP2", fileData).validate() # validateJP2(fileData) File "/usr/local/lib/python3.2/dist-packages/jpylyzer/boxvalidator.py", line 99, in validate to_call() File "/usr/local/lib/python3.2/dist-packages/jpylyzer/boxvalidator.py", line 2255, in validate_JP2 boxType, boxContents).validate() File "/usr/local/lib/python3.2/dist-packages/jpylyzer/boxvalidator.py", line 99, in validate to_call() File "/usr/local/lib/python3.2/dist-packages/jpylyzer/boxvalidator.py", line 1240, in validate_contiguousCodestreamBox if qStyle == 0: UnboundLocalError: local variable 'qStyle' referenced before assignment Signed-off-by: Stefan Weil <sw@weilnetz.de>
Hi Johan, a test file is available from http://weilnetz.de/triggerUnboundLocalError.jp2. I have now updated my patch, so jpylyzer can handle this file. Stefan |
Hi Stefan, I finally merged your patch. One additional question: would you mind if I include your test file in the jpylyzer test corpus (link: https://github.com/openpreserve/jpylyzer-test-files)? Thanks again! Johan |
Hi Johan, you may do so - thanks for jpylyzer and your work. I'm glad if I can help a little bit. Stefan |
Thanks Stefan, I just added the file (with proper credit of course) |
No description provided.