hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

shapely/constructive.py:180: RuntimeWarning: invalid value encountered in buffer return lib.buffer(

Open Joewi44 opened this issue 6 months ago • 1 comments

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc should be added within the dropdown below.)

Software Version Info
downloaded ipynb from here "https://hvplot.holoviz.org/reference/geopandas/polygons.html"

# Name                     Version          Build               Channel
appnope                    0.1.4            pyhd8ed1ab_1        conda-forge
arrow-cpp                  19.0.0           h0b7d223_2
asttokens                  3.0.0            pyhd8ed1ab_1        conda-forge
aws-c-auth                 0.6.19           h80987f9_0
aws-c-cal                  0.5.20           h80987f9_0
aws-c-common               0.8.5            h80987f9_0
aws-c-compression          0.2.16           h80987f9_0
aws-c-event-stream         0.2.15           h313beb8_0
aws-c-http                 0.6.25           h80987f9_0
aws-c-io                   0.13.10          h80987f9_0
aws-c-mqtt                 0.7.13           h80987f9_0
aws-c-s3                   0.1.51           h80987f9_0
aws-c-sdkutils             0.1.6            h80987f9_0
aws-checksums              0.1.13           h80987f9_0
aws-crt-cpp                0.18.16          h313beb8_0
aws-sdk-cpp                1.11.212         hdd7fb2f_0
blas                       1.0              openblas
bleach                     6.2.0            py313hca03da5_0
blinker                    1.9.0            pypi_0              pypi
blosc                      1.21.3           h313beb8_0
bokeh                      3.7.3            py_0                bokeh
boost-cpp                  1.82.0           h48ca7d4_2
bottleneck                 1.4.2            py313ha35b7ea_0
branca                     0.6.0            py313hca03da5_0
brotli-python              1.0.9            py313h313beb8_9
bzip2                      1.0.8            h80987f9_6
c-ares                     1.19.1           h80987f9_0
ca-certificates            2025.4.26        hbd8a1cb_0          conda-forge
cairo                      1.16.0           h302bd0f_5
cartopy                    0.24.1           pypi_0              pypi
certifi                    2025.4.26        py313hca03da5_0
cfitsio                    3.470            h7f6438f_7
charset-normalizer         3.3.2            pyhd3eb1b0_0
click                      8.2.0            pypi_0              pypi
colorcet                   3.1.0            py313hca03da5_0
comm                       0.2.2            pyhd8ed1ab_1        conda-forge
contourpy                  1.3.1            py313h48ca7d4_0
cramjam                    2.9.1            py313h00184e3_0
cycler                     0.11.0           pyhd3eb1b0_0
cyrus-sasl                 2.1.28           h9131b1a_1
dash                       3.0.4            pypi_0              pypi
debugpy                    1.8.11           py313h313beb8_0
decorator                  5.2.1            pyhd8ed1ab_0        conda-forge
et_xmlfile                 1.1.0            py313hca03da5_1
exceptiongroup             1.3.0            pyhd8ed1ab_0        conda-forge
executing                  2.2.0            pyhd8ed1ab_0        conda-forge
expat                      2.7.1            h313beb8_0
fastparquet                2024.11.0        py313ha35b7ea_1
flask                      3.0.3            pypi_0              pypi
folium                     0.14.0           py313hca03da5_0
fontconfig                 2.14.1           h6402c1e_3
fonttools                  4.55.3           py313h80987f9_0
freetype                   2.13.3           h47d26ad_0
freexl                     2.0.0            ha3de405_0
fsspec                     2025.3.2         py313h7eb115d_0
geodatasets                2024.8.0         pypi_0              pypi
geopandas                  1.0.1            py313hca03da5_0
geopandas-base             1.0.1            py313hca03da5_0
geos                       3.10.6           h313beb8_0
geotiff                    1.7.0            hcec61be_4
geoviews                   1.14.0           pypi_0              pypi
gettext                    0.21.0           hbdbcc25_2
gflags                     2.2.2            h313beb8_1
giflib                     5.2.2            h80987f9_0
glib                       2.78.4           h313beb8_0
glib-tools                 2.78.4           h313beb8_0
glog                       0.5.0            h313beb8_1
hdf4                       4.2.13           h5e329fb_3
hdf5                       1.14.5           hd77251f_2
holoviews                  1.20.2           py313hca03da5_0
hvplot                     0.11.3           py313hca03da5_0
icu                        73.1             h313beb8_0
idna                       3.7              py313hca03da5_0
importlib-metadata         8.7.0            pypi_0              pypi
ipykernel                  6.29.5           pyh57ce528_0        conda-forge
ipython                    8.36.0           pyh907856f_0        conda-forge
ipywidgets                 8.1.5            py313hca03da5_0
itsdangerous               2.2.0            pypi_0              pypi
jedi                       0.19.2           pyhd8ed1ab_1        conda-forge
jinja2                     3.1.6            pypi_0              pypi
joblib                     1.4.2            py313hca03da5_0
jpeg                       9e               h80987f9_3
json-c                     0.16             h1a28f6b_0
jupyter_bokeh              4.0.5            py313h80987f9_0
jupyter_client             8.6.3            pyhd8ed1ab_1        conda-forge
jupyter_core               5.7.2            pyh31011fe_1        conda-forge
jupyterlab_widgets         3.0.13           py313hca03da5_0
kealib                     1.5.0            h3444380_2
kiwisolver                 1.4.8            py313h313beb8_0
krb5                       1.20.1           hf3e1bf2_1
lcms2                      2.16             he26ebf3_1
lerc                       4.0.0            h313beb8_0
libabseil                  20250127.0       cxx17_h313beb8_0
libboost                   1.82.0           h0bc93f9_2
libbrotlicommon            1.0.9            h80987f9_9
libbrotlidec               1.0.9            h80987f9_9
libbrotlienc               1.0.9            h80987f9_9
libcurl                    8.12.1           hde089ae_0
libcxx                     14.0.6           h848a8c0_0
libdeflate                 1.22             h80987f9_0
libedit                    3.1.20230828     h80987f9_0
libev                      4.33             h1a28f6b_1
libevent                   2.1.12           h02f6b3c_1
libffi                     3.4.4            hca03da5_1
libgdal                    3.6.2            hb8790f9_10
libgfortran                5.0.0            11_3_0_hca03da5_28
libgfortran5               11.3.0           h009349e_28
libglib                    2.78.4           h0a96307_0
libgrpc                    1.71.0           h62f6fdd_0
libiconv                   1.16             h80987f9_3
libkml                     1.3.0            hc4d7c42_7
libmpdec                   4.0.0            h80987f9_0
libnetcdf                  4.8.1            h7d1a7d1_5
libnghttp2                 1.57.0           h62f6fdd_0
libopenblas                0.3.29           hea593b9_0
libpng                     1.6.39           h80987f9_0
libpq                      17.4             h02f6b3c_0
libprotobuf                5.29.3           h9f9f828_0
libre2-11                  2024.07.02       h313beb8_0
libsodium                  1.0.18           h27ca646_1          conda-forge
libspatialite              5.1.0            h4e90699_2
libssh2                    1.11.1           h3e2b118_0
libthrift                  0.15.0           h73c2103_2
libtiff                    4.7.0            h91aec0a_0
libwebp-base               1.3.2            h80987f9_1
libxml2                    2.13.8           h0b34f26_0
libxslt                    1.1.41           hf4d3faa_0
libzip                     1.8.0            h62fee54_1
linkify-it-py              2.0.0            py313hca03da5_0
llvm-openmp                14.0.6           hc6e5704_0
lxml                       5.3.0            py313h1d4350b_1
lz4-c                      1.9.4            h313beb8_1
mapclassify                2.5.0            py313hca03da5_0
markdown                   3.8              py313hca03da5_0
markdown-it-py             2.2.0            py313hca03da5_1
markupsafe                 3.0.2            pypi_0              pypi
matplotlib                 3.10.0           py313hca03da5_1
matplotlib-base            3.10.0           py313hb68df00_0
matplotlib-inline          0.1.7            pyhd8ed1ab_1        conda-forge
mdit-py-plugins            0.3.0            py313hca03da5_0
mdurl                      0.1.0            py313hca03da5_0
minizip                    4.0.3            ha89c15f_0
narwhals                   1.39.1           pypi_0              pypi
ncurses                    6.4              h313beb8_0
nest-asyncio               1.6.0            pypi_0              pypi
networkx                   3.4.2            py313hca03da5_0
nspr                       4.35             h313beb8_0
nss                        3.89.1           h313beb8_0
numexpr                    2.10.1           py313h5d9532f_0
numpy                      2.2.5            py313hdcf7240_0
numpy-base                 2.2.5            py313h9d8309b_0
ocw-project                0.1.0            dev_0               <develop>
openjpeg                   2.5.2            hba36e21_1
openldap                   2.6.4            he7ef289_0
openpyxl                   3.1.5            py313h80987f9_1
openssl                    3.5.0            h81ee809_1          conda-forge
orc                        2.1.1            h55d209b_0
packaging                  24.2             py313hca03da5_0
pandas                     2.2.3            py313hcf29cfe_0
pandas-datareader          0.10.0           pyhd3eb1b0_0
panel                      1.7.0            py313hca03da5_0
param                      2.2.0            py313hca03da5_0
parso                      0.8.4            pyhd8ed1ab_1        conda-forge
pcre2                      10.42            hb066dcc_1
pexpect                    4.9.0            pyhd8ed1ab_1        conda-forge
pickleshare                0.7.5            pyhd8ed1ab_1004     conda-forge
pillow                     11.1.0           py313h41ba818_1
pip                        25.1             pyhc872135_2
pixman                     0.40.0           h1a28f6b_0
platformdirs               4.3.8            pyhe01879c_0        conda-forge
plotly                     6.1.0            pypi_0              pypi
pooch                      1.8.2            pypi_0              pypi
poppler                    24.09.0          hb57d120_2
poppler-data               0.4.11           hca03da5_1
proj                       9.3.1            hdced247_1
prompt-toolkit             3.0.51           pyha770c72_0        conda-forge
psutil                     7.0.0            py313h90d716c_0     conda-forge
ptyprocess                 0.7.0            pyhd8ed1ab_1        conda-forge
pure_eval                  0.2.3            pyhd8ed1ab_1        conda-forge
pyarrow                    19.0.0           py313h313beb8_1
pygments                   2.19.1           pyhd8ed1ab_0        conda-forge
pyogrio                    0.10.0           py313hcf39714_0
pyparsing                  3.2.0            py313hca03da5_0
pyproj                     3.6.1            py313hf165acc_1
pyshp                      2.3.1            pypi_0              pypi
pysocks                    1.7.1            py313hca03da5_0
python                     3.13.2           h4862095_100_cp313
python-dateutil            2.9.0post0       py313hca03da5_2
python-tzdata              2025.2           pyhd3eb1b0_0
python_abi                 3.13             0_cp313
pytz                       2024.1           py313hca03da5_0
pyviz_comms                3.0.2            py313hca03da5_0
pyyaml                     6.0.2            py313h80987f9_0
pyzmq                      25.1.2           py313h313beb8_0
qhull                      2020.2           h48ca7d4_2
re2                        2024.07.02       h48ca7d4_0
readline                   8.2              h1a28f6b_0
requests                   2.32.3           py313hca03da5_1
retrying                   1.3.4            pypi_0              pypi
scikit-learn               1.6.1            py313h313beb8_0
scipy                      1.15.3           py313hd7edaaf_0
setuptools                 72.1.0           py313hca03da5_0
shapely                    2.0.6            py313hc1b91b6_0
six                        1.17.0           py313hca03da5_0
snappy                     1.2.1            h313beb8_0
sqlite                     3.45.3           h80987f9_0
stack_data                 0.6.3            pyhd8ed1ab_1        conda-forge
threadpoolctl              3.5.0            py313h7eb115d_0
tiledb                     2.3.3            hb4a6b97_3
tk                         8.6.14           h6ba3021_0
tornado                    6.4.2            py313h80987f9_0
tqdm                       4.67.1           py313h7eb115d_0
traitlets                  5.14.3           pyhd8ed1ab_1        conda-forge
typing-extensions          4.12.2           py313hca03da5_0
typing_extensions          4.12.2           py313hca03da5_0
tzdata                     2025b            h04d1e81_0
uc-micro-py                1.0.1            py313hca03da5_0
uriparser                  0.9.7            h80987f9_0
urllib3                    2.3.0            py313hca03da5_0
utf8proc                   2.6.1            h80987f9_1
wcwidth                    0.2.13           pyhd8ed1ab_1        conda-forge
webencodings               0.5.1            py313hca03da5_2
werkzeug                   3.0.6            pypi_0              pypi
wheel                      0.45.1           py313hca03da5_0
widgetsnbextension         4.0.13           py313hca03da5_0
xerces-c                   3.2.4            h313beb8_1
xlrd                       2.0.1            pyhd3eb1b0_1
xyzservices                2022.9.0         py313hca03da5_1
xz                         5.6.4            h80987f9_1
yaml                       0.2.5            h1a28f6b_0
zeromq                     4.3.5            h313beb8_0
zipp                       3.21.0           pypi_0              pypi
zlib                       1.2.13           h18a0788_1
zstd                       1.5.6            hfb09047_0


Description of expected behavior and the observed behavior

/shapely/constructive.py:180: RuntimeWarning: invalid value encountered in buffer return lib.buffer(

=> received this error when running the notebook file from "https://hvplot.holoviz.org/reference/geopandas/polygons.html"

had the same error message with my project, maybe this is linked to installed versions?

Complete, minimal, self-contained example code that reproduces the issue

chicago.hvplot.polygons(
    geo=True,
    c=chicago.POP2010/chicago.to_crs('EPSG:32616').area,
    clabel='pop density',
)

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

  • [ ] I may be interested in making a pull request to address this

Joewi44 avatar Jun 05 '25 12:06 Joewi44

Hi, I was not able to reproduce your error:

import hvplot.pandas
import geodatasets
import geopandas as gpd
import numpy as np

chicago = gpd.read_file(geodatasets.get_path("geoda.chicago_commpop"))

chicago.hvplot.polygons(
    geo=True,
    c=chicago.POP2010/chicago.to_crs('EPSG:32616').area,
    clabel='pop density',
)
Image

Can you try to update to the latest versions of the following dependencies and try again?

Relevant Libraries

hvPlot: 0.11.4.dev45+g854e10b Geopandas: 1.1.1 Numpy: 2.2.6

Azaya89 avatar Jul 17 '25 13:07 Azaya89