H3-Pandas icon indicating copy to clipboard operation
H3-Pandas copied to clipboard

support h3 v4.0.0

Open rfc-hv opened this issue 3 years ago • 1 comments

The upcoming h3-py v4.0.0 release is making some breaking changes to the api.

Currently, if the h3 v4.0 prerelease beta is installed with pip install 'h3==4.0.0b2', it fails to integrate with h3pandas:

First issue: h3.h3 has been removed:

venv/lib/python3.10/site-packages/h3pandas/h3pandas.py:15: in <module>
    from h3 import h3
E   ImportError: cannot import name 'h3' from 'h3' (/home/worker/projects/feasibility_workflow/venv/lib/python3.10/site-packages/h3/__init__.py)

https://github.com/uber/h3-py/blob/f8958ac788ea04e2b383c8b859f75a05c3fcb815/src/h3/init.py#L6-L7

it looks like this first issue could be fixed by replacing from h3 import h3 with import h3.api.basic_str as h3 in h3pandas code and tests

rfc-hv avatar Nov 29 '22 23:11 rfc-hv

did this ever get resolved? I am having the same issue:

ImportError: cannot import name 'h3' from 'h3'

bjohnsonUSGS avatar Feb 14 '24 21:02 bjohnsonUSGS