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

substring not found - Search and Import GEE data #723

Closed
Daniel-Trung-Nguyen opened this issue Oct 27, 2021 · 19 comments
Closed

substring not found - Search and Import GEE data #723

Daniel-Trung-Nguyen opened this issue Oct 27, 2021 · 19 comments
Labels
bug Something isn't working

Comments

@Daniel-Trung-Nguyen
Copy link

This happened when I was trying to use the search and import data button. Can you kindly help?
Many thanks,
Daniel

substring not found

TypeError Traceback (most recent call last)
e:\dropbox\py\projects\spatial\spatialvenv\lib\site-packages\geemap\geemap.py in search_box_callback(text)
357 ee_assets = search_ee_data(text.value)
358 self.search_datasets = ee_assets
--> 359 asset_titles = [x["title"] for x in ee_assets]
360 assets_dropdown.options = asset_titles
361 search_output.clear_output()

TypeError: 'NoneType' object is not iterable

image

@Daniel-Trung-Nguyen Daniel-Trung-Nguyen added the bug Something isn't working label Oct 27, 2021
@giswqs
Copy link
Member

giswqs commented Oct 27, 2021

What keyword did you use for the search?

@giswqs
Copy link
Member

giswqs commented Oct 27, 2021

What's your geemap version? Try updating to the latest version using geemap.update_package() and restart the kernel to take effect.

@Daniel-Trung-Nguyen
Copy link
Author

Any keywords will result in the same error (e.g., elevation, CSIRO). The version I am using is '0.9.4'. The function to search for addresses and lat/lon works ok. I am not sure if there is an issue with my GE credential? Where is the GE credential stored in the local machine?

@giswqs
Copy link
Member

giswqs commented Oct 28, 2021

It works fine on my computer. GEE credential should not be an issue. Otherwise, you won't be able to create the map. Try geemap.update_package() and restart the kernel to see if it resolves the issue.

@Daniel-Trung-Nguyen
Copy link
Author

I can add ee.Image manually, but the search function is still not working, both on VScode and Jupyter Notebook

image

image

@Daniel-Trung-Nguyen
Copy link
Author

image

@giswqs
Copy link
Member

giswqs commented Oct 28, 2021

It appears that your package is not up to date. Line 360 shown on your screenshot is not the same as the Line 360 of the current version. Did you run geemap.update_package() and restart the kernel?

https://github.com/giswqs/geemap/blob/master/geemap/geemap.py#L360
image

@giswqs
Copy link
Member

giswqs commented Oct 28, 2021

I just created a fresh conda env and installed geemap, and the search data GUI works fine. You might want to try creating a fresh conda env as well.

    conda create -n gee python=3.8
    conda activate gee
    conda install mamba -c conda-forge
    mamba install geemap -c conda-forge

@Daniel-Trung-Nguyen
Copy link
Author

Yes, I did. I even uninstalled and reinstalled the package. The geemap-master.zip was downloaded to the Downloads folder after running geemap.update_package(). I am not sure if it was extracted and updated in the virtual environment, but it still shows exactly the same error at Line 360

image

@giswqs
Copy link
Member

giswqs commented Oct 28, 2021

print(geemap.__file__) see where your package is installed. Sometimes conda envs share some packages installed in a weird location, which might cause the issue.

@Daniel-Trung-Nguyen
Copy link
Author

The package was installed in e:\dropbox\py\projects\spatial\spatialvenv\lib\site-packages\geemap_init_.py
I installed it through pip, not conda. I can give it a test without the virtual environment later today.

@giswqs
Copy link
Member

giswqs commented Oct 28, 2021

The file path does not seem right. Try Miniconda.

@Daniel-Trung-Nguyen
Copy link
Author

That is where I had my virtual environment installed

@giswqs
Copy link
Member

giswqs commented Nov 8, 2021

Closing the issue for now. Feel free to reopen if needed.

@giswqs giswqs closed this as completed Nov 8, 2021
@fferlito
Copy link

fferlito commented Mar 8, 2022

I'm having the same issue, as geemap.search_ee_data(keyword) returns always an empty list. This can also be observed in the streamlit app here https://streamlit.geemap.org/ if you try to search for any map in the Google Earth Engine section. It gives me the same problem both on streamlit, and locally in my computer.

@fferlito
Copy link

fferlito commented Mar 8, 2022

Could it be some issue with GEE? Last Thursday everything was working fine.

@giswqs
Copy link
Member

giswqs commented Mar 8, 2022

The GEE team made some changes to the Earth Engine STAC catalog. The might cause the issue. I haven't had time to look into to yet

https://twitter.com/kurtschwehr/status/1500943318305230848?s=21

@giswqs
Copy link
Member

giswqs commented Mar 8, 2022

It works fine on my Linux machine. @fferlito What operating system are you using? python and geemap version?

image

@fferlito
Copy link

fferlito commented Mar 9, 2022

It works again now! Probably it was some issue with GEE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants