-
Notifications
You must be signed in to change notification settings - Fork 390
Open
Description
Dear cartopy devs:
deepcopy of a NaturalEarthFeature fails on some machines if the CRS is triggered from the shapefile.. I tested this on two machines with the exact same hardware, OS, dependencies, installation process, and configs. On one machine it works, on the other it fails.
import copy
import cartopy.feature as cfeature
feat = cfeature.NaturalEarthFeature(
category="cultural",
name="admin_0_countries",
scale="110m",
facecolor="none",
)
list(feat.geometries()) # assigns CRS to feat._crs
copy.deepcopy(feat)
Error: TypeError: CRS.__init__() missing 1 required positional argument: 'proj4_params'
Notes:
-
This was tested using Python 3.12.11, Cartopy 0.25.0, pyproj 3.7.2
-
If the CRS attribute is not set (comment out list(feat.geometries())), then deepcopy succeeds.
Please let me know if you would like additional details.
Metadata
Metadata
Assignees
Labels
No labels