GlacioHack / geoutils

Analysis of georeferenced rasters and vectors
https://geoutils.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
85 stars 19 forks source link

Vector instantiation with geopandas dataset fails #391

Closed adehecq closed 9 months ago

adehecq commented 1 year ago

When I try to start a Vector instance with a geopandas' dataset, it fails with the error: "AttributeError: module 'shapely' has no attribute 'Geometry'" Not sure what's going on...

To Reproduce In my local environment, the test suite of Vector fails: pytest tests/test_vector.py

System (please complete the following information):

I'm working with shapely=1.8.5. Full conda env below.

# Name Version Build Channel affine 2.4.0 pyhd8ed1ab_0 conda-forge alabaster 0.7.12 pypi_0 pypi anyio 3.7.1 pyhd8ed1ab_0 conda-forge aom 3.5.0 hf0c8a7f_0 conda-forge appnope 0.1.3 pyhd8ed1ab_0 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py39ha30fb19_3 conda-forge arrow 1.2.3 pyhd8ed1ab_0 conda-forge arrow-cpp 10.0.1 h57ddcff_4_cpu conda-forge asciitree 0.3.3 py_2 conda-forge astroid 2.7.2 pypi_0 pypi asttokens 2.2.1 pyhd8ed1ab_0 conda-forge async-lru 2.0.4 pyhd8ed1ab_0 conda-forge attrs 23.1.0 pyh71513ae_1 conda-forge aws-c-auth 0.6.21 h79862ba_1 conda-forge aws-c-cal 0.5.20 h2f96456_3 conda-forge aws-c-common 0.8.5 hb7f2c08_0 conda-forge aws-c-compression 0.2.16 hfb1f584_0 conda-forge aws-c-event-stream 0.2.16 hb9fe1ad_0 conda-forge aws-c-http 0.6.29 h40fbe91_0 conda-forge aws-c-io 0.13.11 hb3bb6ef_2 conda-forge aws-c-mqtt 0.7.13 h9baa75a_10 conda-forge aws-c-s3 0.2.1 hfb6aee5_2 conda-forge aws-c-sdkutils 0.1.7 hfb1f584_0 conda-forge aws-checksums 0.1.14 hfb1f584_0 conda-forge aws-crt-cpp 0.18.16 hb25e9ed_5 conda-forge aws-sdk-cpp 1.9.379 h6febe8c_6 conda-forge babel 2.9.1 pypi_0 pypi backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports-entry-points-selectable 1.1.0 pypi_0 pypi backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-forge beautifulsoup4 4.12.2 pyha770c72_0 conda-forge black 23.7.0 py39h6e9494a_1 conda-forge bleach 6.0.0 pyhd8ed1ab_0 conda-forge blosc 1.21.4 heccf04b_0 conda-forge bokeh 3.2.1 pyhd8ed1ab_0 conda-forge boost-cpp 1.78.0 h31500c2_2 conda-forge branca 0.6.0 pyhd8ed1ab_0 conda-forge brotli 1.0.9 hb7f2c08_9 conda-forge brotli-bin 1.0.9 hb7f2c08_9 conda-forge brotli-python 1.0.9 py39h7a8716b_9 conda-forge brotlipy 0.7.0 py39ha30fb19_1005 conda-forge brunsli 0.1 h046ec9c_0 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.19.1 h0dc2134_0 conda-forge c-blosc2 2.10.0 h0dcb076_0 conda-forge ca-certificates 2023.7.22 h8857fd0_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge cairo 1.16.0 h904041c_1014 conda-forge cartopy 0.21.0 py39hbc3d154_2 conda-forge certifi 2023.7.22 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py39h131948b_3 conda-forge cfgv 3.3.1 pypi_0 pypi cfitsio 4.1.0 h2c97ad1_0 conda-forge cftime 1.6.2 py39h7cc1f47_1 conda-forge charls 2.3.4 he49afe7_0 conda-forge charset-normalizer 3.2.0 pyhd8ed1ab_0 conda-forge click 8.1.6 unix_pyh707e725_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.7.2 pyhd8ed1ab_1 conda-forge cloudpickle 2.2.1 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge comm 0.1.4 pyhd8ed1ab_0 conda-forge contourpy 1.1.0 py39h8ee36c8_0 conda-forge cryptography 39.0.0 py39h7eb6a14_0 conda-forge curl 7.86.0 h57eb407_1 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cytoolz 0.12.2 py39hdc70f33_0 conda-forge dask 2023.8.0 pyhd8ed1ab_0 conda-forge dask-core 2023.8.0 pyhd8ed1ab_0 conda-forge dataclasses 0.8 pyhc8e2a94_3 conda-forge dav1d 1.2.1 h0dc2134_0 conda-forge dbus 1.13.6 h811a1a6_3 conda-forge debugpy 1.6.8 py39h840bb9f_0 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge deprecated 1.2.13 pypi_0 pypi distlib 0.3.2 pypi_0 pypi distributed 2023.8.0 pyhd8ed1ab_0 conda-forge docutils 0.16 pypi_0 pypi double-conversion 3.2.0 hf0c8a7f_1 conda-forge eigen 3.4.0 h940c156_0 conda-forge emcee 3.1.4 pyhd8ed1ab_0 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge exceptiongroup 1.1.2 pyhd8ed1ab_0 conda-forge executing 1.2.0 pyhd8ed1ab_0 conda-forge expat 2.5.0 hf0c8a7f_1 conda-forge fasteners 0.17.3 pyhd8ed1ab_0 conda-forge ffmpeg 4.4.2 gpl_h8b4fe81_112 conda-forge filelock 3.0.12 pypi_0 pypi fiona 1.8.22 py39h6fa385f_0 conda-forge flake8 3.9.2 pypi_0 pypi flit-core 3.9.0 pyhd8ed1ab_0 conda-forge folium 0.14.0 pyhd8ed1ab_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.2 h5bb23bf_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.42.0 py39hdc70f33_0 conda-forge fqdn 1.5.1 pyhd8ed1ab_0 conda-forge freetype 2.12.1 h3f81eb7_1 conda-forge freexl 1.0.6 hb7f2c08_1 conda-forge fsspec 2023.6.0 pyh1a96a4e_0 conda-forge gdal 3.5.2 py39h6aafa27_4 conda-forge gdown 4.7.1 pyhd8ed1ab_0 conda-forge geopandas 0.13.2 pyhd8ed1ab_1 conda-forge geopandas-base 0.13.2 pyha770c72_1 conda-forge geos 3.11.0 hb486fe8_0 conda-forge geotiff 1.7.1 ha1a2aeb_3 conda-forge geoutils 0.0.9 pypi_0 pypi gettext 0.21.1 h8a4c099_0 conda-forge gflags 2.2.2 hb1e8313_1004 conda-forge giflib 5.2.1 hb7f2c08_3 conda-forge git-lfs 3.4.0 h694c41f_0 conda-forge gl2ps 1.4.2 h4cff582_0 conda-forge glew 2.1.0 h046ec9c_2 conda-forge glib 2.76.4 h7d26f99_0 conda-forge glib-tools 2.76.4 h7d26f99_0 conda-forge glog 0.6.0 h8ac2a54_0 conda-forge gmp 6.2.1 h2e338ed_0 conda-forge gnutls 3.7.8 h207c4f0_0 conda-forge graphite2 1.3.13 h2e338ed_1001 conda-forge grpcio 1.42.0 pypi_0 pypi gst-plugins-base 1.20.3 h37e1711_2 conda-forge gstools 1.5.0 py39h4a91e55_0 conda-forge gstreamer 1.20.3 h1d18e73_2 conda-forge h5py 3.8.0 nompi_py39h7d40783_100 conda-forge hankel 1.2.2 pyhd8ed1ab_0 conda-forge harfbuzz 6.0.0 h08f8713_0 conda-forge hdf4 4.2.15 h7aa5921_5 conda-forge hdf5 1.12.2 nompi_hc782337_100 conda-forge heapdict 1.0.1 py_0 conda-forge icu 70.1 h96cf925_0 conda-forge identify 2.2.13 pypi_0 pypi idna 3.4 pyhd8ed1ab_0 conda-forge imagecodecs 2022.9.26 py39h1e0cc1c_3 conda-forge imageio 2.31.1 pyh24c5eb1_0 conda-forge imagesize 1.2.0 pypi_0 pypi importlib-metadata 6.8.0 pyha770c72_0 conda-forge importlib-resources 6.0.1 pyhd8ed1ab_0 conda-forge importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge importlib_resources 6.0.1 pyhd8ed1ab_0 conda-forge iniconfig 1.1.1 pypi_0 pypi ipdb 0.13.13 pyhd8ed1ab_0 conda-forge ipykernel 6.25.1 pyh5fb750a_0 conda-forge ipympl 0.9.3 pyhd8ed1ab_0 conda-forge ipython 8.14.0 pyhd1c38e8_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 8.1.0 pyhd8ed1ab_0 conda-forge isoduration 20.11.0 pyhd8ed1ab_0 conda-forge isort 5.9.3 pypi_0 pypi jasper 2.0.33 h7c6fec8_1 conda-forge jbig 2.1 h0d85af4_2003 conda-forge jedi 0.19.0 pyhd8ed1ab_0 conda-forge jinja2 3.0.1 pypi_0 pypi joblib 1.3.0 pyhd8ed1ab_1 conda-forge jpeg 9e hb7f2c08_3 conda-forge json-c 0.16 h01d06f9_0 conda-forge json5 0.9.14 pyhd8ed1ab_0 conda-forge jsoncpp 1.9.5 h940c156_1 conda-forge jsonpointer 2.0 py_0 conda-forge jsonschema 4.2.1 pypi_0 pypi jsonschema-specifications 2023.7.1 pyhd8ed1ab_0 conda-forge jsonschema-with-format-nongpl 4.19.0 pyhd8ed1ab_0 conda-forge jupyter 1.0.0 py39h6e9494a_8 conda-forge jupyter-lsp 2.2.0 pyhd8ed1ab_0 conda-forge jupyter_client 8.3.0 pyhd8ed1ab_0 conda-forge jupyter_console 6.6.3 pyhd8ed1ab_0 conda-forge jupyter_core 5.3.1 py39h6e9494a_0 conda-forge jupyter_events 0.7.0 pyhd8ed1ab_2 conda-forge jupyter_server 2.7.0 pyhd8ed1ab_0 conda-forge jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge jupyterlab 4.0.4 pyhd8ed1ab_0 conda-forge jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge jupyterlab_server 2.24.0 pyhd8ed1ab_0 conda-forge jupyterlab_widgets 3.0.8 pyhd8ed1ab_0 conda-forge jupytext 1.15.0 pyhcff175f_0 conda-forge jxrlib 1.1 h35c211d_2 conda-forge kealib 1.4.15 h51f5cc1_1 conda-forge kh9-glacier-global 0.0.1 dev_0 kiwisolver 1.4.4 py39h92daf61_1 conda-forge krb5 1.19.3 hb49756b_0 conda-forge lame 3.100 hb7f2c08_1003 conda-forge lazy-object-proxy 1.6.0 pypi_0 pypi lazy_loader 0.2 pyhd8ed1ab_0 conda-forge lcms2 2.14 h90f4b2a_0 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libabseil 20220623.0 cxx17_h844d122_6 conda-forge libaec 1.0.6 hf0c8a7f_1 conda-forge libarrow 10.0.1 hc216794_4_cpu conda-forge libavif 0.11.1 h22361c6_2 conda-forge libblas 3.9.0 17_osx64_openblas conda-forge libbrotlicommon 1.0.9 hb7f2c08_9 conda-forge libbrotlidec 1.0.9 hb7f2c08_9 conda-forge libbrotlienc 1.0.9 hb7f2c08_9 conda-forge libcblas 3.9.0 17_osx64_openblas conda-forge libclang 14.0.6 default_hdb78580_1 conda-forge libclang13 14.0.6 default_h953c2e9_1 conda-forge libcrc32c 1.1.2 he49afe7_0 conda-forge libcurl 7.86.0 h57eb407_1 conda-forge libcxx 16.0.6 hd57cbcb_0 conda-forge libdap4 3.20.6 h3e144a0_2 conda-forge libdeflate 1.14 hb7f2c08_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libevent 2.1.10 h815e4d9_4 conda-forge libexpat 2.5.0 hf0c8a7f_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgdal 3.5.2 h02359ec_4 conda-forge libgfortran 5.0.0 11_3_0_h97931a8_32 conda-forge libgfortran5 12.2.0 he409387_32 conda-forge libglib 2.76.4 hc62aa5d_0 conda-forge libgoogle-cloud 2.5.0 h32e9745_1 conda-forge libgrpc 1.51.1 h834a566_0 conda-forge libiconv 1.17 hac89ed1_0 conda-forge libidn2 2.3.4 hb7f2c08_0 conda-forge libkml 1.3.0 haeb80ef_1015 conda-forge liblapack 3.9.0 17_osx64_openblas conda-forge liblapacke 3.9.0 17_osx64_openblas conda-forge libllvm11 11.1.0 h8fb7429_5 conda-forge libllvm13 13.0.1 h64f94b2_2 conda-forge libllvm14 14.0.6 hc8e404f_4 conda-forge libnetcdf 4.8.1 nompi_hc61b76e_106 conda-forge libnghttp2 1.51.0 h0dd9d14_0 conda-forge libogg 1.3.4 h35c211d_1 conda-forge libopenblas 0.3.23 openmp_h429af6e_0 conda-forge libopencv 4.5.3 py39h7178df7_8 conda-forge libopus 1.3.1 hc929b4f_1 conda-forge libpng 1.6.39 ha978bb4_0 conda-forge libpq 14.5 h4aa9af9_3 conda-forge libprotobuf 3.21.12 hbc0c0cd_0 conda-forge librttopo 1.1.0 he07d8f5_11 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libspatialindex 1.9.3 he49afe7_4 conda-forge libspatialite 5.0.1 h611af13_19 conda-forge libsqlite 3.42.0 h58db7d2_0 conda-forge libssh2 1.10.0 h7535e13_3 conda-forge libtasn1 4.19.0 hb7f2c08_0 conda-forge libtheora 1.1.1 h0d85af4_1005 conda-forge libthrift 0.16.0 h08c06f4_2 conda-forge libtiff 4.4.0 h6268bbc_5 conda-forge libunistring 0.9.10 h0d85af4_0 conda-forge libutf8proc 2.8.0 hb7f2c08_0 conda-forge libvorbis 1.3.7 h046ec9c_0 conda-forge libvpx 1.11.0 he49afe7_3 conda-forge libwebp 1.2.4 hfa4350a_0 conda-forge libwebp-base 1.2.4 h775f41a_0 conda-forge libxcb 1.13 h0d85af4_1004 conda-forge libxml2 2.10.3 h201ad9d_4 conda-forge libxslt 1.1.37 h5d22bc9_0 conda-forge libzip 1.9.2 h3ad4413_1 conda-forge libzlib 1.2.13 h8a1eda9_5 conda-forge libzopfli 1.0.3 h046ec9c_0 conda-forge llvm-openmp 16.0.6 hff08bdf_0 conda-forge llvmlite 0.39.1 py39had167e2_1 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge loguru 0.7.0 py39h6e9494a_0 conda-forge lxml 4.9.2 py39hfbce9ca_0 conda-forge lz4 4.3.2 py39hd0af75a_0 conda-forge lz4-c 1.9.4 hf0c8a7f_0 conda-forge mapclassify 2.5.0 pyhd8ed1ab_1 conda-forge markdown-it-py 3.0.0 pyhd8ed1ab_0 conda-forge markupsafe 2.1.3 py39hdc70f33_0 conda-forge matplotlib 3.7.2 py39h6e9494a_0 conda-forge matplotlib-base 3.7.2 py39h6e39af2_0 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge matplotlib-scalebar 0.8.1 pyhd8ed1ab_0 conda-forge mccabe 0.6.1 pypi_0 pypi mdit-py-plugins 0.4.0 pyhd8ed1ab_0 conda-forge mdurl 0.1.0 pyhd8ed1ab_0 conda-forge meshio 5.3.4 pyhd8ed1ab_0 conda-forge mistune 3.0.0 pyhd8ed1ab_0 conda-forge mpmath 1.3.0 pyhd8ed1ab_0 conda-forge msgpack-python 1.0.5 py39h92daf61_0 conda-forge munch 4.0.0 pyhd8ed1ab_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mypy_extensions 1.0.0 pyha770c72_0 conda-forge mysql-common 8.0.32 h7ebae80_0 conda-forge mysql-libs 8.0.32 hc37e033_0 conda-forge nbclassic 1.0.0 pyhb4ecaf3_1 conda-forge nbclient 0.8.0 pyhd8ed1ab_0 conda-forge nbconvert 7.7.3 pyhd8ed1ab_0 conda-forge nbconvert-core 7.7.3 pyhd8ed1ab_0 conda-forge nbconvert-pandoc 7.7.3 pyhd8ed1ab_0 conda-forge nbformat 5.9.2 pyhd8ed1ab_0 conda-forge ncurses 6.4 hf0c8a7f_0 conda-forge nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge netcdf4 1.6.2 nompi_py39h0d363ce_100 conda-forge nettle 3.8.1 h96f3785_1 conda-forge networkx 3.1 pyhd8ed1ab_0 conda-forge nodeenv 1.6.0 pypi_0 pypi noisyopt 0.2.2 pypi_0 pypi notebook 7.0.2 pyhd8ed1ab_0 conda-forge notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge nspr 4.35 hea0b92c_0 conda-forge nss 3.89 h78b00b3_0 conda-forge numba 0.56.4 py39h6e2ba77_1 conda-forge numcodecs 0.11.0 py39h7a8716b_1 conda-forge numpy 1.23.5 py39hdfa1d0c_0 conda-forge numpydoc 1.1.0 pypi_0 pypi opencv 4.5.3 py39h6e9494a_8 conda-forge opencv-contrib-python 4.5.3.56 pypi_0 pypi openh264 2.3.1 hf0c8a7f_2 conda-forge openjpeg 2.5.0 h5d0d7b0_1 conda-forge openssl 1.1.1v h8a1eda9_0 conda-forge orc 1.8.2 ha9d861c_2 conda-forge overrides 7.4.0 pyhd8ed1ab_0 conda-forge p11-kit 0.24.1 h65f8906_0 conda-forge packaging 23.1 pyhd8ed1ab_0 conda-forge pandas 2.0.3 py39h11b3245_1 conda-forge pandoc 3.1.3 h9d075a6_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge parquet-cpp 1.5.1 2 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge partd 1.4.0 pyhd8ed1ab_0 conda-forge pathspec 0.11.2 pyhd8ed1ab_0 conda-forge pcre 8.45 he49afe7_0 conda-forge pcre2 10.40 h1c4e4bc_0 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.2.0 py39h35d4919_3 conda-forge pip 23.2.1 pyhd8ed1ab_0 conda-forge pixman 0.40.0 hbcb3906_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge platformdirs 2.2.0 pypi_0 pypi pluggy 0.13.1 pypi_0 pypi ply 3.11 py_1 conda-forge pooch 1.7.0 pyha770c72_3 conda-forge poppler 22.10.0 hf2ff1a1_0 conda-forge poppler-data 0.4.12 hd8ed1ab_0 conda-forge postgresql 14.5 h7bc2cb3_3 conda-forge pre-commit 2.14.0 pypi_0 pypi proj 9.0.1 h05f0992_1 conda-forge proj-data 1.14 hd8ed1ab_0 conda-forge prometheus_client 0.17.1 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.39 pyha770c72_0 conda-forge prompt_toolkit 3.0.39 hd8ed1ab_0 conda-forge protobuf 3.19.1 pypi_0 pypi psutil 5.9.5 py39ha30fb19_0 conda-forge pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pugixml 1.11.4 he965462_1 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge py 1.10.0 pypi_0 pypi py-opencv 4.5.3 py39h2a79d86_8 conda-forge pyarrow 10.0.1 py39h31d4e7f_4_cpu conda-forge pycodestyle 2.7.0 pypi_0 pypi pycparser 2.21 pyhd8ed1ab_0 conda-forge pyevtk 1.6.0 pyha21a80b_0 conda-forge pyflakes 2.3.1 pypi_0 pypi pygments 2.16.1 pyhd8ed1ab_0 conda-forge pylint 2.10.2 pypi_0 pypi pyobjc-core 9.2 py39head00df_0 conda-forge pyobjc-framework-cocoa 9.2 py39head00df_0 conda-forge pyopenssl 23.2.0 pyhd8ed1ab_1 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyproj 3.4.0 py39h5233054_0 conda-forge pyqt 5.15.7 py39h727c745_0 conda-forge pyqt-impl 5.12.3 py39he44290a_8 conda-forge pyqt5-sip 12.11.0 py39h7c248c4_0 conda-forge pyqtchart 5.15.7 py39h727c745_0 conda-forge pyqtwebengine 5.12.1 py39he44290a_8 conda-forge pyrsistent 0.19.3 py39ha30fb19_0 conda-forge pyshp 2.3.1 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 6.2.4 pypi_0 pypi pytest-lazy-fixture 0.6.3 pypi_0 pypi python 3.9.15 h531fd05_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.18.0 pyhd8ed1ab_0 conda-forge python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python_abi 3.9 3_cp39 conda-forge pytransform3d 3.3.0 pyha21a80b_0 conda-forge pytz 2023.3 pyhd8ed1ab_0 conda-forge pyvista 0.41.1 pyhd8ed1ab_0 conda-forge pywavelets 1.4.1 py39h7cc1f47_0 conda-forge pyyaml 6.0 py39ha30fb19_5 conda-forge pyzmq 25.1.0 py39hdac9eea_0 conda-forge qhull 2020.2 h940c156_2 conda-forge qt 5.12.9 h2a607e2_5 conda-forge qt-main 5.15.4 h938c29d_2 conda-forge qtconsole 5.4.3 pyhd8ed1ab_0 conda-forge qtconsole-base 5.4.3 pyha770c72_0 conda-forge qtpy 2.3.1 pyhd8ed1ab_0 conda-forge ragmac-xdem 0.1.dev40+g4faccf0.d20211217 dev_0 rasterio 1.3.3 py39hf3d91f2_0 conda-forge ray 1.9.0 pypi_0 pypi re2 2022.06.01 hb486fe8_1 conda-forge readline 8.2 h9e318b2_1 conda-forge redis 4.0.2 pypi_0 pypi referencing 0.30.2 pyhd8ed1ab_0 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge rich 13.5.1 pyhd8ed1ab_0 conda-forge richdem 2.3.0 py39h7b21526_3 conda-forge rioxarray 0.14.1 pyhd8ed1ab_0 conda-forge rpds-py 0.9.2 py39hf33989b_0 conda-forge rtree 1.0.1 py39h7d0d40a_2 conda-forge scikit-gstat 1.0.10 py39h6e9494a_1 conda-forge scikit-image 0.21.0 py39h840bb9f_0 conda-forge scikit-learn 1.3.0 py39hcb35850_0 conda-forge scipy 1.11.1 py39hded996c_0 conda-forge scooby 0.7.2 pyhd8ed1ab_0 conda-forge send2trash 1.8.2 pyhd1c38e8_0 conda-forge setuptools 68.0.0 pyhd8ed1ab_0 conda-forge shapely 1.8.5 py39hf33cec1_1 conda-forge sip 6.6.2 py39hd408605_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.10 h225ccf5_0 conda-forge sniffio 1.3.0 pyhd8ed1ab_0 conda-forge snowballstemmer 2.1.0 pypi_0 pypi snuggs 1.4.7 py_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sphinx 4.1.2 pypi_0 pypi sphinx-autodoc-typehints 1.12.0 pypi_0 pypi sphinx-gallery 0.9.0 pypi_0 pypi sphinx-rtd-theme 0.5.2 pypi_0 pypi sphinxcontrib-applehelp 1.0.2 pypi_0 pypi sphinxcontrib-devhelp 1.0.2 pypi_0 pypi sphinxcontrib-htmlhelp 2.0.0 pypi_0 pypi sphinxcontrib-jsmath 1.0.1 pypi_0 pypi sphinxcontrib-programoutput 0.17 pypi_0 pypi sphinxcontrib-qthelp 1.0.3 pypi_0 pypi sphinxcontrib-serializinghtml 1.1.5 pypi_0 pypi sqlite 3.42.0 h2b0dec6_0 conda-forge stack_data 0.6.2 pyhd8ed1ab_0 conda-forge svt-av1 1.4.1 hf0c8a7f_0 conda-forge tbb 2021.10.0 h1c7c39f_0 conda-forge tbb-devel 2021.10.0 h1c7c39f_0 conda-forge tblib 1.7.0 pyhd8ed1ab_0 conda-forge terminado 0.17.1 pyhd1c38e8_0 conda-forge testpath 0.6.0 pyhd8ed1ab_0 conda-forge threadpoolctl 3.2.0 pyha21a80b_0 conda-forge tifffile 2022.10.10 pyhd8ed1ab_0 conda-forge tiledb 2.11.3 h3b7b576_1 conda-forge tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.3.2 py39hdc70f33_0 conda-forge tqdm 4.65.2 pyhd8ed1ab_0 conda-forge traitlets 5.9.0 pyhd8ed1ab_0 conda-forge typed-ast 1.5.4 py39ha30fb19_1 conda-forge typing-extensions 4.7.1 hd8ed1ab_0 conda-forge typing_extensions 4.7.1 pyha770c72_0 conda-forge typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge tzcode 2023c hb7f2c08_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge unicodedata2 15.0.0 py39ha30fb19_0 conda-forge uri-template 1.3.0 pyhd8ed1ab_0 conda-forge urllib3 2.0.4 pyhd8ed1ab_0 conda-forge utfcpp 3.2.3 h694c41f_0 conda-forge virtualenv 20.7.2 pypi_0 pypi vtk 9.1.0 qt_py39hb621341_214 conda-forge wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge webcolors 1.13 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.6.1 pyhd8ed1ab_0 conda-forge wheel 0.41.1 pyhd8ed1ab_0 conda-forge widgetsnbextension 4.0.8 pyhd8ed1ab_0 conda-forge wrapt 1.12.1 pypi_0 pypi x264 1!164.3095 h775f41a_2 conda-forge x265 3.5 hbb4e6a2_3 conda-forge xarray 2023.7.0 pyhd8ed1ab_0 conda-forge xdem 0.0.13 dev_0 xerces-c 3.2.4 h2007e90_1 conda-forge xorg-libxau 1.0.11 h0dc2134_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xyzservices 2023.7.0 pyhd8ed1ab_0 conda-forge xz 5.2.6 h775f41a_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge zarr 2.16.0 pyhd8ed1ab_0 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zfp 1.0.0 ha894c9a_3 conda-forge zict 3.0.0 pyhd8ed1ab_0 conda-forge zipp 3.16.2 pyhd8ed1ab_0 conda-forge zlib 1.2.13 h8a1eda9_5 conda-forge zlib-ng 2.0.7 hb7f2c08_0 conda-forge zstd 1.5.2 h829000d_7 conda-forge

rhugonnet commented 1 year ago

@adehecq You need to update shapely. The 1.8.5 version (1 year old) does not support the syntax shapely.Geometry:

(shapely_test) atom@pop-os:~/code/devel/libs$ python -c "import shapely; test = shapely.Geometry"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'shapely' has no attribute 'Geometry'

The reason it didn't trigger before is because the related line (https://github.com/GlacioHack/geoutils/blob/main/geoutils/vector.py#L86) is not executed during package import, only when the function is used. So it's your environment update in July that broke it.

Otherwise, we could add backwards-compatibility with a different type syntax. Or force shapely > 2.0 in the environment file (but this hasn't been in issue given what we force in geopandas already).

adehecq commented 1 year ago

Yes, that's what I thought about the version of shapely. But I couldn't easily find the equivalence between the two versions. It's good you implemented the backward-compatibility. Somehow, when I installed another package, it forced a downgrade to shapely 1.8.5... This may occur for other people as well, it's difficult to always have the latest version of all packages!

adehecq commented 1 year ago

Actually, the issue occurs in other places for shapely.LineString that exists only since 2.0. For backward compatibility, it would need to be replaced by shapely.geometry.LineString.

adehecq commented 9 months ago

Closing this as it should have normally been fixed by #392 and #405. Test "test_vector.py::TestVector::test_init" works fine locally with shapely=1.8.5. Note that other tests in test_vector.py fail locally, but do not seem related to shapely issues.

rhugonnet commented 9 months ago

Note that other tests in test_vector.py fail locally, but do not seem related to shapely issues.

Mmmhh... That might be due to geopandas versioning. Current tests go through a "manual" list with almost all geopandas functions but don't adapt completely to the current environment version, so old geopandas versions might trigger errors.