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

orcropus-gpageseg: UnboundLocalError: local variable 'gray' referenced before assignment #222

Closed
wrznr opened this issue May 30, 2017 · 2 comments · Fixed by #287
Closed

Comments

@wrznr
Copy link

wrznr commented May 30, 2017

Current Behavior

If I use the CLI option --gray and no .nrm.png is provided, an UnboundLocalError is thrown.

Possible Solution

In line 380 of ocropus-gpageseg, add one indent level to the checktype test and an error message which complains about the missing grayscale file (since it is a prerequisite for --gray, cf. line 431). Also an update of the CLI option help might be useful.

I would have liked to create a pull request for that one. But it is not possible to fork the same github project twice (https://stackoverflow.com/questions/6675994/is-it-possible-to-fork-a-fork-in-github) and I already forked the fork kraken.

@zuphilip
Copy link
Collaborator

Can you create a PR from a different branch, i.e. something like

git remote add ocropy https://github.com/tmbdev/ocropy.git
git fetch ocropy
git checkout -b ocropy ocropy/master

?

@zuphilip
Copy link
Collaborator

Fixed in #287

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

Successfully merging a pull request may close this issue.

2 participants