cesiumpy
cesiumpy copied to clipboard
Example from README gives Google warning and shows nothing
I tried to run this on a recent version of Jupyter notebook:
import cesiumpy
v = cesiumpy.Viewer()
v.entities.add(cesiumpy.Box(dimensions=(40e4, 30e4, 50e4),
material=cesiumpy.color.RED, position=(-120, 40, 0)))
v
But I get this warning:
/home/juanlu/.pyenv/versions/3.7.4/envs/mbp37/lib/python3.7/site-packages/cesiumpy/extension/geocode.py:12: UserWarning: Since July 2018 Google requires each request to have an API key. Pass a valid `api_key` to GoogleV3 geocoder to hide this warning. See https://developers.google.com/maps/documentation/geocoding/usage-and-billing
_GEOCODER = GoogleV3()
a JavaScript error message:
ReferenceError: Cesium is not defined
and a blank recangle:
I guess this is related: https://github.com/sinhrks/cesiumpy/issues/75
For some reason, rerunning the cell fixes the issue.
Any suggestions on how to set the google api key? First Tutorial (01_simple_widget.ipynb) is not working for me also re-runnning no error but also no map.
I have same problem. Can you please tell us how to fix this issue?
👍 still an issue.
I tried to run this on a recent version of Jupyter notebook:
import cesiumpy v = cesiumpy.Viewer() v.entities.add(cesiumpy.Box(dimensions=(40e4, 30e4, 50e4), material=cesiumpy.color.RED, position=(-120, 40, 0))) v
But I get this warning:
/home/juanlu/.pyenv/versions/3.7.4/envs/mbp37/lib/python3.7/site-packages/cesiumpy/extension/geocode.py:12: UserWarning: Since July 2018 Google requires each request to have an API key. Pass a valid `api_key` to GoogleV3 geocoder to hide this warning. See https://developers.google.com/maps/documentation/geocoding/usage-and-billing _GEOCODER = GoogleV3()
a JavaScript error message:
ReferenceError: Cesium is not defined
and a blank recangle:
Same situation for me. Rerunning does not help
I am running in Python 3.9 under WSL2 and getting the same error.
This package has so much potential I'm really disappointed to hit this api key wall! Maybe I just can't find how /where to enter my key when I import cesiumpy in Jupyter Notebooks (python 3.9 also), but can't get past that import step without the same message. I had already imported all the other packages before this point and cesiumpy is triggering it.
"ConfigurationError: Since July 2018 Google requires each request to have an API key. Pass a valid api_key
to GoogleV3 geocoder to fix this error. See https://developers.google.com/maps/documentation/geocoding/usage-and-billing
"
One hackfix is downgrading the geopy version.
pip install geopy==2.0.0
I tried the hack and it returns and error:
AttributeError Traceback (most recent call last)
/tmp/ipykernel_3405/636219109.py in
~/.conda/envs/cezium3.7/lib/python3.7/site-packages/cesiumpy/init.py in
AttributeError: module 'cesiumpy' has no attribute 'data'