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

Incompatibility with new shapely major version #831

Closed
anders-kiaer opened this issue Jan 18, 2023 · 1 comment · May be fixed by equinor/webviz-subsurface#1261
Closed

Incompatibility with new shapely major version #831

anders-kiaer opened this issue Jan 18, 2023 · 1 comment · May be fixed by equinor/webviz-subsurface#1261
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@anders-kiaer
Copy link

I think this issue belongs in xtgeo. Downstream we see an issue if we don't restrict what version of shapely pip pulls down. Using the new version 2.0 we see this in CI:

  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/xtgeo/xyz/polygons.py", line 750, in get_fence
    return _xyz_oper.get_fence(
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/xtgeo/xyz/_xyz_oper.py", line 250, in get_fence
    hxlen = fence.get_shapely_objects()[0].length
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/xtgeo/xyz/polygons.py", line 605, in get_shapely_objects
    spoly = sg.LineString(np.stack([pxcor, pycor, pzcor], axis=1))
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/shapely/geometry/linestring.py", line 73, in __new__
    geom = shapely.linestrings(coordinates)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/shapely/decorators.py", line 77, in wrapped
    return func(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/shapely/creation.py", line 120, in linestrings
    return lib.linestrings(coords, out=out, **kwargs)
TypeError: ufunc 'linestrings' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
@anders-kiaer anders-kiaer added bug Something isn't working question Further information is requested labels Jan 18, 2023
@anders-kiaer anders-kiaer changed the title Incomaptibility with new shapely major version Incompatibility with new shapely major version Jan 27, 2023
@mferrera mferrera self-assigned this Feb 7, 2024
@mferrera
Copy link
Contributor

mferrera commented Feb 7, 2024

This issue was either resolved with #822, a minor release of shapely, or some other changes in xtgeo.

equinor/webviz-subsurface#1261

@mferrera mferrera closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants