3

I have this code, but its doesn't show up the maps (output). I don't know what is the error.

import geemap
Map=geemap.Map()
Map

After running the above code, I get the error "AttributeError: module 'collections' has no attribute 'Callable'"

I have also tried the code below, but this one gives the error "AttributeError: module 'ee' has no attribute 'Reducer' "

import ee
ee.Authenticate()
import geemap
Map=geemap()
Map

I have an account on google earth engine and both the codes demand access link but after entering the link, these errors show up. I have also tried changing browsers of Jupyter lab to Google, Firefox and edge.....but still no progress.

Ricky
  • 69
  • 1
  • 7
  • `Callable` was moved from the `collections` module to `collections.abc` back in Python 3.3. You must be using a really old version of `geemap` if it's still looking for this class in the old location. – jasonharper Jan 06 '22 at 20:53
  • @jasonharper I have installed the geemap just 2 days ago.....at first it was working fine but then I updated google client api and restarted the kernel. From then on the problem began. Maybe reinstalling might prove to be helpful. – Ricky Jan 06 '22 at 21:38

3 Answers3

4

I had this problem and fixed it by downgrading my python version to be less than 3.10.

jsta
  • 3,216
  • 25
  • 35
0

This problem was informed here, to solve this I edited the httplib2shim package

in C:\Users\USERxx\AppData\Local\Programs\Python\Python310\Lib\site-packages\httplib2shim_init_.py

Changing the line 45:

45 if isinstance(proxy_info, collections.Callable):

for

45 if isinstance(proxy_info, collections.abc.Callable):

and it worked fine

FerT
  • 1
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 11 '22 at 06:26
0

You can solve the problem in one easy way. The new python file name and the built-in function name conflict are modified, change the name of the Python file.