-
Notifications
You must be signed in to change notification settings - Fork 12
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
'GeometryCollection' object has no attribute 'exterior' #68
Comments
I patched the failing line in 677 try:
678 return interp.exterior.coords[:-1] # keep open
679 except AttributeError as e:
680 print(interp)
681 raise e I copied the patch to the docker container and commited the docker container to a testing docker image. Then, instead of running the whole workflow, I executed just the failing step:
I attach the output below:
I assume the LINESTRING is what is causing the issues. |
I patched 675 if interp.type.startswith('Multi') or interp.type == 'GeometryCollection':
676 interp = interp.convex_hull This seems to have fixed this issue. Would you like me to open a pull request, or is there an easy way to investigate which one of the 95 files in directory |
Dear @Witiko, thanks for the detailed report and the suggestions! This topic was hot across multiple similarly implemented modules in the recent days. There is a full-scale discussion at OCR-D/ocrd_segment#43, and comprehensive fixes have been proposed (OCR-D/ocrd_tesserocr#152, #61) or merged (https://github.com/OCR-D/ocrd_segment/) already. These will be integrated into a new ocrd_all release shortly. If you'd like to test these yourself already in a Docker installation, you can follow these steps: docker run -it ocrd/all:maximum
cd /build/ocrd_segment && git pull && pip install -e .
cd /build/ocrd_tesserocr && git pull origin pull/152/head && pip install -e .
cd /build/ocrd_cis && git pull origin pull/61/head && pip install -e .
# now to make that change permanent in your image, wait here,
# and in *another shell* (outside your running container) do:
docker container commit $(docker container ls --filter status=running --format "{{.ID}}") ocrd/all:maximum |
Thanks, @bertsky, I am trying that out now. I will let you know if things are fixed. |
Or, if you just wait another hour (or so), the new ocrd/all image will become available. |
@bertsky Thank you, I will wait. After the suggested changes, I am receiving the following error:
|
Must have been a temporary impasse. I can fetch 2.16.3 from PyPI now. In the current ocrd/all:maximum, |
@bertsky I am experiencing no issues with the yesterday's docker image. Thanks again. |
Environment
ocrd/all:maximum
from 2020-09-10 (docker image id: 9e71ab5d7d53)Current behavior
When executing docker run -v 1085:/data -w /data -v calamari_models:/models -- ocrd/all:maximum ocrd process ⟨here omitting the “best results for selected pages” workflow⟩, I receive the following error:
I uploaded the contents of the directory 1085
here(removed now) to make reproduction easier. See also an example input image.The text was updated successfully, but these errors were encountered: