Closed kgju closed 2 years ago
Could you provide code that can reproduce the issue?
The code I use is only the sample code provided in geemap.
import os import ee import geemap
Map = geemap.Map() Map
image = ee.ImageCollection("LANDSAT/LC08/C02/T1_TOA").first() Map.addLayer(image, {}, 'Landsat') Map.centerObject(image)
geemap.download_ee_image(image, "landsat.tif", scale=100)
@kgju Your geedim package is probably outdate. Try updating the geedim package using pip install -U geedim
.
@dugalh I am using Python 3.10 and geedim v1.3.0. I keep running into the kernel dying error using the sample code @kgju provided above. It works before. No sure why it no longer works.
Referring to your GitHub tutorial, I created a new virtual environment to install geemap and geedim, which shows that the installation has been successful. But when i import geedim or using download code,I encountered the following errors: AttributeError: partially initialized module 'rasterio' has no attribute '_loading'
@kgju I haven't been able to replicate your problem - the geemap example is working for me. Can you try downloading the example image with the latest version of geedim (v1.3.1) directly?
On the command line:
geedim download -i LANDSAT/LC08/C02/T1_TOA/LC08_001004_20140609 --scale 100 -o
Or via the API:
import geedim as gd
gd.Initialize()
gd_image = gd.MaskedImage.from_id('LANDSAT/LC08/C02/T1_TOA/LC08_001004_20140609')
gd_image.download('landsat.tif', scale=100, overwrite=True)
@giswqs There is a problem with concurrent calls to ee.Image.getDownloadURL
causing a segmentation fault, somewhere in the python networking libraries. Initially, I only saw this under python 3.10, but when I initialise Earth Engine as you do in geemap i.e. ee.Initialize(http_transport=httplib2.Http())
, I found the same problem under other python versions. It should be resolved with a thread lock around ee.Image.getDownloadURL
in the latest release v1.3.1.
@dugalh Many thanks for looking into this. I can confirm that it is now working properly. One thing I noticed is that sometimes the progress bar is in red color even though the image has been downloaded successfully.
@giswqs Sure. OK, great. I think the red bar is a feature of tqdm
, to indicate it has completed. Red for stopped I guess.
Yeah, I guess it is not a geedim issue. When downloading multiple images, sometimes in green, sometime in red. Users might be confused. However, it seems all images are downloaded successfully. The color does not really matter.
I'll look into it. Possibly the tqdm
progress is not quite getting to 100% on the bars that stay green.
@giswqs The red bars are not quite getting to 100%. Which makes sense in hindsight. I'll fix it in the next release.
@dugalh v1.3.2 has resolved the issue. Nice to see the beautiful green bars! Thank you for fixing it.
:)
I was Successfully installed geedim-0.1.4, but This error occurs when I use geemap to download images