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

Type Error TypeError: '<' not supported between instances of 'ContourInfo' and 'ContourInfo' #21

Open
Maria-Moosa opened this issue Jul 20, 2020 · 2 comments

Comments

@Maria-Moosa
Copy link

Maria-Moosa commented Jul 20, 2020

The code works fine for a some of my own images, but for a few images I get this TypeError:

Traceback (most recent call last):
File "page_dewarp.py", line 918, in
main()
File "page_dewarp.py", line 871, in main
spans = assemble_spans(name, small, pagemask, cinfo_list)
File "page_dewarp.py", line 493, in assemble_spans
candidate_edges.sort()
TypeError: '<' not supported between instances of 'ContourInfo' and 'ContourInfo'

@Kiode
Copy link

Kiode commented Aug 17, 2020

I meet the same error when I use my own image as input.

@ethanthai2
Copy link

ethanthai2 commented Nov 6, 2020

We will sort only the first element of the tuple. Change that line to:

candidate_edges.sort(key=lambda x: x[0])

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

No branches or pull requests

3 participants