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

Merged
merged 3 commits into from Dec 2, 2015

Conversation

Projects
None yet
2 participants
@stweil
Contributor

stweil commented Oct 14, 2015

No description provided.

Remove spaces at line endings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
@bitsgalore

This comment has been minimized.

Show comment
Hide comment
@bitsgalore

bitsgalore Oct 15, 2015

Member

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.

Member

bitsgalore commented Oct 15, 2015

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.

stweil added some commits Oct 14, 2015

boxvalidator: Fix Python runtime error
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>
Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
@stweil

This comment has been minimized.

Show comment
Hide comment
@stweil

stweil Oct 18, 2015

Contributor

Hi Johan,

a test file is available from http://weilnetz.de/triggerUnboundLocalError.jp2.
It was created by kdu_compress from a TIFF file, but obviously the conversion failed.

I have now updated my patch, so jpylyzer can handle this file.

Stefan

Contributor

stweil commented Oct 18, 2015

Hi Johan,

a test file is available from http://weilnetz.de/triggerUnboundLocalError.jp2.
It was created by kdu_compress from a TIFF file, but obviously the conversion failed.

I have now updated my patch, so jpylyzer can handle this file.

Stefan

@bitsgalore bitsgalore merged commit a3f9f17 into openpreserve:master Dec 2, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@bitsgalore

This comment has been minimized.

Show comment
Hide comment
@bitsgalore

bitsgalore Dec 2, 2015

Member

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

Member

bitsgalore commented Dec 2, 2015

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

@stweil

This comment has been minimized.

Show comment
Hide comment
@stweil

stweil Dec 2, 2015

Contributor

Hi Johan,

you may do so - thanks for jpylyzer and your work. I'm glad if I can help a little bit.

Stefan

Contributor

stweil commented Dec 2, 2015

Hi Johan,

you may do so - thanks for jpylyzer and your work. I'm glad if I can help a little bit.

Stefan

@bitsgalore

This comment has been minimized.

Show comment
Hide comment
@bitsgalore

bitsgalore Dec 2, 2015

Member

Thanks Stefan, I just added the file (with proper credit of course)

Member

bitsgalore commented Dec 2, 2015

Thanks Stefan, I just added the file (with proper credit of course)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment