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

Fix exception with older shapely versions #58996

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/PyQt6/core/__init__.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,9 @@ except ModuleNotFoundError:

try:
import shapely as _shapely
import shapely.geometry as _sg

def _geometry_as_shapely(self) -> _shapely.geometry.base.BaseGeometry:
def _geometry_as_shapely(self) -> _sg.base.BaseGeometry:
wkb_qbytearray = self.asWkb() # Get the geometry in WKB format (QByteArray)
shapely_geom = _shapely.from_wkb(wkb_qbytearray.data())

Expand Down
3 changes: 2 additions & 1 deletion python/core/__init__.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,9 @@ except ModuleNotFoundError:

try:
import shapely as _shapely
import shapely.geometry as _sg

def _geometry_as_shapely(self) -> _shapely.geometry.base.BaseGeometry:
def _geometry_as_shapely(self) -> _sg.base.BaseGeometry:
wkb_qbytearray = self.asWkb() # Get the geometry in WKB format (QByteArray)
shapely_geom = _shapely.from_wkb(wkb_qbytearray.data())

Expand Down
Loading