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

While downloading images this error appears #144

Open
shubham-scisar opened this issue Sep 15, 2019 · 9 comments
Open

While downloading images this error appears #144

shubham-scisar opened this issue Sep 15, 2019 · 9 comments

Comments

@shubham-scisar
Copy link

shubham-scisar commented Sep 15, 2019

`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.

@drewbo
Copy link
Contributor

drewbo commented Sep 16, 2019

@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]?

@shubham-scisar
Copy link
Author

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

@shubham-scisar
Copy link
Author

I have installed label-maker through conda.

@shubham-scisar
Copy link
Author

shubham-scisar commented Sep 17, 2019

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

@drewbo
Copy link
Contributor

drewbo commented Sep 17, 2019

@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

@ramyaragupathy
Copy link

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

@drewbo
Copy link
Contributor

drewbo commented Dec 18, 2019

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

@ramyaragupathy
Copy link

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

@drewbo
Copy link
Contributor

drewbo commented Jan 29, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants