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

Example from README gives Google warning and shows nothing #77

Open
astrojuanlu opened this issue Oct 11, 2019 · 10 comments · May be fixed by #80
Open

Example from README gives Google warning and shows nothing #77

astrojuanlu opened this issue Oct 11, 2019 · 10 comments · May be fixed by #80

Comments

@astrojuanlu
Copy link

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:

Screenshot from 2019-10-11 11-49-25

@astrojuanlu
Copy link
Author

I guess this is related: #75

@astrojuanlu
Copy link
Author

For some reason, rerunning the cell fixes the issue.

@rb83421
Copy link

rb83421 commented Jan 31, 2020

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.

@smitp0829
Copy link

I have same problem. Can you please tell us how to fix this issue?

@Joeffison
Copy link

👍 still an issue.

@AlexS12
Copy link

AlexS12 commented May 23, 2020

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:

Screenshot from 2019-10-11 11-49-25

Same situation for me. Rerunning does not help

@markuskreitzer
Copy link

I am running in Python 3.9 under WSL2 and getting the same error.

@khurchla
Copy link

khurchla commented Nov 15, 2021

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
Screen Shot 2021-11-15 at 1 36 28 PM
"

@erikreed erikreed linked a pull request May 16, 2022 that will close this issue
@erikreed
Copy link

One hackfix is downgrading the geopy version.

pip install geopy==2.0.0

@johndehart
Copy link

I tried the hack and it returns and error:


AttributeError Traceback (most recent call last)
/tmp/ipykernel_3405/636219109.py in
----> 1 import cesiumpy

~/.conda/envs/cezium3.7/lib/python3.7/site-packages/cesiumpy/init.py in
4 # data
5 import cesiumpy.data.country # noqa
----> 6 countries = cesiumpy.data.country.CountryLoader() # noqa
7
8 # entities

AttributeError: module 'cesiumpy' has no attribute 'data'

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

Successfully merging a pull request may close this issue.

9 participants