label-maker icon indicating copy to clipboard operation
label-maker copied to clipboard

While downloading images this error appears

Open shubham-scisar opened this issue 5 years ago • 9 comments

`Downloading 239 tiles to data/tiles Traceback (most recent call last): File "rasterio/_base.pyx", line 213, in rasterio._base.DatasetBase.init File "rasterio/_shim.pyx", line 64, in rasterio._shim.open_dataset File "rasterio/_err.pyx", line 205, in rasterio._err.exc_wrap_pointer rasterio._err.CPLE_HttpResponseError: HTTP response code: 422 - Failed writing header

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/shubham/anaconda3/envs/bldgdet/bin/label-maker", line 11, in sys.exit(cli()) File "/home/shubham/anaconda3/envs/bldgdet/lib/python3.6/site-packages/label_maker/main.py", line 105, in cli download_images(dest_folder=dest_folder, **config) File "/home/shubham/anaconda3/envs/bldgdet/lib/python3.6/site-packages/label_maker/images.py", line 72, in download_images image_function = get_image_function(imagery) File "/home/shubham/anaconda3/envs/bldgdet/lib/python3.6/site-packages/label_maker/utils.py", line 144, in get_image_function if is_tif(imagery): File "/home/shubham/anaconda3/envs/bldgdet/lib/python3.6/site-packages/label_maker/utils.py", line 125, in is_tif with rasterio.open(imagery) as test_ds: File "/home/shubham/anaconda3/envs/bldgdet/lib/python3.6/site-packages/rasterio/env.py", line 423, in wrapper return f(*args, **kwds) File "/home/shubham/anaconda3/envs/bldgdet/lib/python3.6/site-packages/rasterio/init.py", line 216, in open s = DatasetReader(path, driver=driver, **kwargs) File "rasterio/_base.pyx", line 215, in rasterio._base.DatasetBase.init rasterio.errors.RasterioIOError: HTTP response code: 422 - Failed writing header `

Kindly help as Images could not be downloaded.

shubham-scisar avatar Sep 15 '19 11:09 shubham-scisar

@shubhamsharma1609 what imagery are you using? It looks like something might be wrong with the file. If you have it available locally, and rasterio installed, can you try running rio insp [filename]?

drewbo avatar Sep 16 '19 13:09 drewbo

I am just using through command line label-maker images and I am getting this error .

shubham-scisar avatar Sep 17 '19 03:09 shubham-scisar

I have installed label-maker through conda.

shubham-scisar avatar Sep 17 '19 03:09 shubham-scisar

I tried downloading the tiles for mexico,that are given in this tutorial :

https://github.com/developmentseed/label-maker/blob/master/examples/walkthrough-tensorflow-object-detection.md

shubham-scisar avatar Sep 17 '19 03:09 shubham-scisar

@shubhamsharma1609 which version of rasterio do you have installed? There is a specific catch for this error here which should prevent the processing from stopping at this point. Not totally sure why that isn't the case

drewbo avatar Sep 17 '19 14:09 drewbo

hey @drewbo - I'm also facing the same error for label-maker images command. This is for the Togo dataset in a conda environment with rasterio 1.1.1

ramyaragupathy avatar Dec 18 '19 15:12 ramyaragupathy

@ramyaragupathy @shubhamsharma1609 are you using a valid mapbox API access token?

drewbo avatar Dec 18 '19 16:12 drewbo

yes - the first two steps - download and labels went through

ramyaragupathy avatar Dec 18 '19 16:12 ramyaragupathy

@ramyaragupathy @shubhamsharma1609 because of a specific API issue that we haven't resolved for tiling yet, the library is pinned to a specific rasterio verison (rasterio==1.0a12). Can you try using that and see if it resolves? Also it might be worth clearing out the data folder and starting from scratch: I've had trouble reproducing this one

drewbo avatar Jan 29 '20 02:01 drewbo