OCR-D / ocrd_tesserocr

Run tesseract with the tesserocr bindings with @OCR-D's interfaces
MIT License
38 stars 11 forks source link

A lot of ShapelyDeprecationWarning: The 'type' attribute is deprecated #192

Closed mikegerber closed 1 year ago

mikegerber commented 1 year ago

I'm getting pages and pages of ShapelyDeprecationWarnings, using 0.16.0:

/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1544: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'MultiPolygon':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1541: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'GeometryCollection':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1544: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'MultiPolygon':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1541: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'GeometryCollection':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1544: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'MultiPolygon':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1541: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'GeometryCollection':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1544: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'MultiPolygon':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1541: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'GeometryCollection':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1544: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'MultiPolygon':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1541: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'GeometryCollection':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1544: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'MultiPolygon':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1541: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
  if interp.type == 'GeometryCollection':
/usr/local/share/pyenv/versions/3.7.16/lib/python3.7/site-packages/ocrd_tesserocr/recognize.py:1544: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.

(and so on)

This is Shapely 2.0.1.

bertsky commented 1 year ago

I know. Already fixed by #191 (which you'll need with recent core releases anyway).

mikegerber commented 1 year ago

It's indeed fixed by #191!