Hey there,
I installed a virtual anaconda environment using python 3.9 and then installed the latest release candidate of flopy. From there I ran the flopy3_triangle.ipynb and got the following error in line 75 of geospatial_utils.py:
if isinstance(obj, self.__shapefile.Shape):
AttributeError: 'NoneType' object has no attribute 'Shape'
I stepped into tri.add_polygon(circle_poly) in my script, then stepped into geom = GeoSpatialUtil(polygon, shapetype="Polygon") (line 86 of triangle.py), which took me to geospatial_utils.py. It here that I noticed on line 60 the following:
self.__shapefile = import_optional_dependency( "shapefile", errors="silent" )
I ran that line of code without errors="silent" and received this error:
ImportError: Missing optional dependency 'pyshp'. Use pip or conda to install pyshp
Once I installed pyshp everything works out fine and I get to my voronoi mesh from the triangle mesh.
So I am wondering if I missed this dependency in the documentation? Either way, I thought I would bring it to your attention.
Thanks for providing such a great product.
Hey there,
I installed a virtual anaconda environment using python 3.9 and then installed the latest release candidate of flopy. From there I ran the flopy3_triangle.ipynb and got the following error in line 75 of geospatial_utils.py:
I stepped into
tri.add_polygon(circle_poly)in my script, then stepped intogeom = GeoSpatialUtil(polygon, shapetype="Polygon")(line 86 of triangle.py), which took me to geospatial_utils.py. It here that I noticed on line 60 the following:self.__shapefile = import_optional_dependency( "shapefile", errors="silent" )I ran that line of code without
errors="silent"and received this error:Once I installed pyshp everything works out fine and I get to my voronoi mesh from the triangle mesh.
So I am wondering if I missed this dependency in the documentation? Either way, I thought I would bring it to your attention.
Thanks for providing such a great product.