Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'numpy' has no attribute 'warnings' #1220

Closed
wybert opened this issue May 20, 2023 · 1 comment
Closed

AttributeError: module 'numpy' has no attribute 'warnings' #1220

wybert opened this issue May 20, 2023 · 1 comment

Comments

@wybert
Copy link

wybert commented May 20, 2023

I am following the 3_Interactivity.ipynb example, howerver, I got an error with

hv.output(backend="matplotlib")
agg = ds.Canvas().points(df,'x','y')
hd.datashade(points)  +  hd.shade(hv.Image(agg)) + hv.RGB(np.array(tf.shade(agg).to_pil()), bounds=(-10,-10,10,10))

AttributeError Traceback (most recent call last)
Cell In[27], line 2
1 hv.output(backend="matplotlib")
----> 2 agg = ds.Canvas().points(df,'x','y')
3 hd.datashade(points) + hd.shade(hv.Image(agg)) + hv.RGB(np.array(tf.shade(agg).to_pil()), bounds=(-10,-10,10,10))

File /opt/homebrew/Caskroom/mambaforge/base/envs/datashader/lib/python3.10/site-packages/datashader/core.py:219, in Canvas.points(self, source, x, y, agg, geometry)
212 raise ValueError(
213 "source must be an instance of spatialpandas.GeoDataFrame or \n"
214 "spatialpandas.dask.DaskGeoDataFrame.\n"
215 " Received value of type {typ}".format(typ=type(source)))
217 glyph = MultiPointGeometry(geometry)
--> 219 return bypixel(source, self, glyph, agg)

File /opt/homebrew/Caskroom/mambaforge/base/envs/datashader/lib/python3.10/site-packages/datashader/core.py:1258, in bypixel(source, canvas, glyph, agg, antialias)
1255 canvas.validate()
1257 # All-NaN objects (e.g. chunks of arrays with no data) are valid in Datashader
-> 1258 with np.warnings.catch_warnings():
1259 np.warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered')
1260 return bypixel.pipeline(source, schema, canvas, glyph, agg, antialias=antialias)

File /opt/homebrew/Caskroom/mambaforge/base/envs/datashader/lib/python3.10/site-packages/numpy/init.py:320, in getattr(attr)
317 from .testing import Tester
318 return Tester
--> 320 raise AttributeError("module {!r} has no attribute "
321 "{!r}".format(name, attr))

AttributeError: module 'numpy' has no attribute 'warnings'

image

I use is mac M1, my conda env is,

packages in environment at /opt/homebrew/Caskroom/mambaforge/base/envs/datashader:

Name Version Build Channel
anyio 3.6.2 pyhd8ed1ab_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 py310h8e9501a_3 conda-forge
asttokens 2.2.1 pyhd8ed1ab_0 conda-forge
attrs 23.1.0 pyh71513ae_1 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 pyhd8ed1ab_3 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
beautifulsoup4 4.12.2 pyha770c72_0 conda-forge
bleach 6.0.0 pyhd8ed1ab_0 conda-forge
bokeh 3.1.1 pyhd8ed1ab_0 conda-forge
brotli 1.0.9 h1a8c8d9_8 conda-forge
brotli-bin 1.0.9 h1a8c8d9_8 conda-forge
brotlipy 0.7.0 py310h8e9501a_1005 conda-forge
bzip2 1.0.8 h3422bc3_4 conda-forge
ca-certificates 2023.5.7 hf0a4a13_0 conda-forge
certifi 2023.5.7 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py310h2399d43_3 conda-forge
charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge
click 8.1.3 unix_pyhd8ed1ab_2 conda-forge
cloudpickle 2.2.1 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
colorcet 3.0.1 pyhd8ed1ab_0 conda-forge
comm 0.1.3 pyhd8ed1ab_0 conda-forge
contourpy 1.0.7 py310h2887b22_0 conda-forge
cryptography 40.0.2 py310hfc83b78_0 conda-forge
cycler 0.11.0 pyhd8ed1ab_0 conda-forge
dask-core 2023.5.0 pyhd8ed1ab_0 conda-forge
datashader 0.14.4 pyh1a96a4e_0 conda-forge
datashape 0.5.4 py_1 conda-forge
debugpy 1.6.7 py310h0f1eb42_0 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
executing 1.2.0 pyhd8ed1ab_0 conda-forge
flit-core 3.9.0 pyhd8ed1ab_0 conda-forge
fonttools 4.39.4 py310h2aa6e3c_0 conda-forge
freetype 2.12.1 hd633e50_1 conda-forge
fsspec 2023.5.0 pyh1a96a4e_0 conda-forge
holoviews 1.16.0 py_0 pyviz
idna 3.4 pyhd8ed1ab_0 conda-forge
importlib-metadata 6.6.0 pyha770c72_0 conda-forge
importlib_metadata 6.6.0 hd8ed1ab_0 conda-forge
importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge
ipykernel 6.23.1 pyh736e0ef_0 conda-forge
ipython 8.13.2 pyhd1c38e8_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
jedi 0.18.2 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge
jupyter_client 8.2.0 pyhd8ed1ab_0 conda-forge
jupyter_core 5.3.0 py310hbe9552e_0 conda-forge
jupyter_events 0.6.3 pyhd8ed1ab_0 conda-forge
jupyter_server 2.5.0 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge
jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
kiwisolver 1.4.4 py310h2887b22_1 conda-forge
lcms2 2.15 hd835a16_1 conda-forge
lerc 4.0.0 h9a09cb3_0 conda-forge
libblas 3.9.0 16_osxarm64_openblas conda-forge
libbrotlicommon 1.0.9 h1a8c8d9_8 conda-forge
libbrotlidec 1.0.9 h1a8c8d9_8 conda-forge
libbrotlienc 1.0.9 h1a8c8d9_8 conda-forge
libcblas 3.9.0 16_osxarm64_openblas conda-forge
libcxx 16.0.4 h4653b0c_0 conda-forge
libdeflate 1.18 h1a8c8d9_0 conda-forge
libexpat 2.5.0 hb7217d7_1 conda-forge
libffi 3.4.2 h3422bc3_5 conda-forge
libgfortran 5.0.0 12_2_0_hd922786_31 conda-forge
libgfortran5 12.2.0 h0eea778_31 conda-forge
libjpeg-turbo 2.1.5.1 h1a8c8d9_0 conda-forge
liblapack 3.9.0 16_osxarm64_openblas conda-forge
libllvm14 14.0.6 hd1a9a77_2 conda-forge
libopenblas 0.3.21 openmp_hc731615_3 conda-forge
libpng 1.6.39 h76d750c_0 conda-forge
libsodium 1.0.18 h27ca646_1 conda-forge
libsqlite 3.42.0 hb31c410_0 conda-forge
libtiff 4.5.0 h4f7d55c_6 conda-forge
libwebp-base 1.3.0 h1a8c8d9_0 conda-forge
libxcb 1.13 h9b22ae9_1004 conda-forge
libzlib 1.2.13 h03a7124_4 conda-forge
linkify-it-py 2.0.0 pyhd8ed1ab_0 conda-forge
llvm-openmp 16.0.4 h1c12783_0 conda-forge
llvmlite 0.40.0 py310h95b248a_0 conda-forge
locket 1.0.0 pyhd8ed1ab_0 conda-forge
markdown 3.4.3 pyhd8ed1ab_0 conda-forge
markdown-it-py 2.2.0 pyhd8ed1ab_0 conda-forge
markupsafe 2.1.2 py310h8e9501a_0 conda-forge
matplotlib 3.7.1 py310hb6292c7_0 conda-forge
matplotlib-base 3.7.1 py310h78c5c2f_0 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
mdit-py-plugins 0.3.5 pyhd8ed1ab_0 conda-forge
mdurl 0.1.0 pyhd8ed1ab_0 conda-forge
mistune 2.0.5 pyhd8ed1ab_0 conda-forge
multipledispatch 0.6.0 py_0 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
nbclassic 1.0.0 pyhb4ecaf3_1 conda-forge
nbclient 0.7.4 pyhd8ed1ab_0 conda-forge
nbconvert 7.4.0 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.4.0 pyhd8ed1ab_0 conda-forge
nbconvert-pandoc 7.4.0 pyhd8ed1ab_0 conda-forge
nbformat 5.8.0 pyhd8ed1ab_0 conda-forge
ncurses 6.3 h07bb92c_1 conda-forge
nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge
notebook 6.5.4 pyha770c72_0 conda-forge
notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge
numba 0.57.0 py310hb9b3264_0 conda-forge
numpy 1.24.3 py310haa1e00c_0 conda-forge
openjpeg 2.5.0 hbc2ba62_2 conda-forge
openssl 3.1.0 h53f4e23_3 conda-forge
packaging 23.1 pyhd8ed1ab_0 conda-forge
pandas 2.0.1 py310h1cdf563_1 conda-forge
pandoc 2.19.2 hce30654_2 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
panel 1.0.2 py_0 pyviz
param 1.13.0 pyh1a96a4e_0 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
partd 1.4.0 pyhd8ed1ab_0 conda-forge
pexpect 4.8.0 pyh1a96a4e_2 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pillow 9.5.0 py310h07496d3_0 conda-forge
pip 23.1.2 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge
platformdirs 3.5.1 pyhd8ed1ab_0 conda-forge
pooch 1.7.0 pyha770c72_3 conda-forge
prometheus_client 0.16.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.38 pyha770c72_0 conda-forge
prompt_toolkit 3.0.38 hd8ed1ab_0 conda-forge
psutil 5.9.5 py310h8e9501a_0 conda-forge
pthread-stubs 0.4 h27ca646_1001 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pyct 0.4.6 py_0 conda-forge
pyct-core 0.4.6 py_0 conda-forge
pygments 2.15.1 pyhd8ed1ab_0 conda-forge
pyobjc-core 9.1.1 py310h44ed3dd_0 conda-forge
pyobjc-framework-cocoa 9.1.1 py310h44ed3dd_0 conda-forge
pyopenssl 23.1.1 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pyrsistent 0.19.3 py310h8e9501a_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.10.11 h3ba56d0_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.16.3 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.10 3_cp310 conda-forge
pytz 2023.3 pyhd8ed1ab_0 conda-forge
pyviz_comms 2.2.1 py_0 pyviz
pyyaml 6.0 py310h8e9501a_5 conda-forge
pyzmq 25.0.2 py310hc407298_0 conda-forge
readline 8.2 h92ec313_1 conda-forge
requests 2.29.0 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
scipy 1.10.1 py310h0975f3d_3 conda-forge
send2trash 1.8.2 pyhd1c38e8_0 conda-forge
setuptools 67.7.2 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
terminado 0.17.1 pyhd1c38e8_0 conda-forge
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.12 he1e0b03_0 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
tornado 6.3.2 py310h2aa6e3c_0 conda-forge
tqdm 4.65.0 pyhd8ed1ab_1 conda-forge
traitlets 5.9.0 pyhd8ed1ab_0 conda-forge
typing-extensions 4.5.0 hd8ed1ab_0 conda-forge
typing_extensions 4.5.0 pyha770c72_0 conda-forge
tzdata 2023c h71feb2d_0 conda-forge
uc-micro-py 1.0.1 pyhd8ed1ab_0 conda-forge
unicodedata2 15.0.0 py310h8e9501a_0 conda-forge
urllib3 1.26.15 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 py_1 conda-forge
websocket-client 1.5.1 pyhd8ed1ab_0 conda-forge
wheel 0.40.0 pyhd8ed1ab_0 conda-forge
xarray 2023.5.0 pyhd8ed1ab_0 conda-forge
xorg-libxau 1.0.9 h27ca646_0 conda-forge
xorg-libxdmcp 1.1.3 h27ca646_0 conda-forge
xyzservices 2023.5.0 pyhd8ed1ab_1 conda-forge
xz 5.2.6 h57fd34a_0 conda-forge
yaml 0.2.5 h3422bc3_2 conda-forge
zeromq 4.3.4 hbdafb3b_1 conda-forge
zipp 3.15.0 pyhd8ed1ab_0 conda-forge
zstd 1.5.2 hf913c23_6 conda-forge

@ianthomas23
Copy link
Member

Thanks @wybert, this has already been fixed by #1176.

There will be a new release soon that includes the fix, probably within the next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants