hyriver / pygeohydro

A part of HyRiver software stack for accessing hydrology data through web services
https://docs.hyriver.io
Other
68 stars 23 forks source link

Error "cannot import name 'MatchCRS' from 'pygeoogc'" when importing pynhd or pygeohydro #104

Closed qideng7 closed 1 year ago

qideng7 commented 1 year ago

What happened?

Got error: "cannot import name 'MatchCRS' from 'pygeoogc'" when importing pynhd. Windows conda env info:

What did you expect to happen?

No response

Minimal Complete Verifiable Example

import pynhd

MVCE confirmation

Relevant log output

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[3], line 1
----> 1 import pynhd
      2 import pandas
      3 import geopandas

File ~\anaconda3\envs\flow_Ml\lib\site-packages\pynhd\__init__.py:7
      5 from .network_tools import prepare_nhdplus, topoogical_sort, vector_accumulation
      6 from .print_versions import show_versions
----> 7 from .pynhd import NLDI, NHDPlusHR, WaterData
      9 try:
     10     __version__ = get_distribution(__name__).version

File ~\anaconda3\envs\flow_Ml\lib\site-packages\pynhd\pynhd.py:10
      8 import pygeoogc as ogc
      9 import pygeoutils as geoutils
---> 10 from pygeoogc import WFS, ArcGISRESTful, MatchCRS, RetrySession, ServiceURL
     11 from requests import Response
     12 from shapely.geometry import MultiPolygon, Polygon

ImportError: cannot import name 'MatchCRS' from 'pygeoogc'

Anything else we need to know?

No response

Environment

qideng7 commented 1 year ago

Resolved after conda remove shapely and conda install -c conda-forge pynhd. pynhd updated from 0.2.0 to 0.14.0.