cisocrgroup/ocrd_cis

Latest release is broken with Shapely 2.0.x

Closed this issue · 1 comments

Traceback (most recent call last):
  File "/usr/local/share/pyenv/versions/3.7.16/bin/ocrd-cis-ocropy-segment", line 11, in <module>
    load_entry_point('ocrd-cis==0.1.5', 'console_scripts', 'ocrd-cis-ocropy-segment')()
  File "/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2862, in load_entry_point
    return ep.load()
  File "/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2462, in load
    return self.resolve()
  File "/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2468, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_cis/ocropy/cli.py", line 11, in <module>
    from ocrd_cis.ocropy.segment import OcropySegment
  File "/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py", line 8, in <module>
    from shapely.geometry import Polygon, asPolygon
ImportError: cannot import name 'asPolygon' from 'shapely.geometry' (/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/shapely/geometry/__init__.py)

This is 0.1.5, but git also seems to be affected from the looks of it.

ocrd_all uses #87, which already supported Shapely 2 migration in advance 1yr ago.

When I have time, I'll work a bit more on the PR so that it can be merged.