leftfield-geospatial / geedim

Search, composite, and download Google Earth Engine imagery.

Home Page:https://geedim.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'BaseImage' object has no attribute 'dowwnload'

giswqs opened this issue · comments

Very useful package! I am trying to incorporate it into geemap, but it is seems the BaseImage.download() function cannot be placed within a function. It throws an error 'BaseImage' object has no attribute 'dowwnload'. It works fine when it is not placed within a function. It is probably because multi-thread processes can only be run at the top level. Do you have a solution for this?

def download_ee_image(
    image,
    filename,
    scale=None,
    **kwargs,
):

    import geedim as gd
    
    if scale is not None:
        kwargs['scale'] = scale
    
    img = gd.download.BaseImage(image)
    img.dowwnload(filename, **kwargs)

Sorry, my bad. I had a typo in my code. Problem solved.