developmentseed / label-maker

Data Preparation for Satellite Machine Learning
http://devseed.com/label-maker/
MIT License
461 stars 110 forks source link

Downloading fails with large QA Tile files #35

Closed Geoyi closed 6 years ago

Geoyi commented 6 years ago

While label-maker download mbtiles for united_states_of_america casues Invalid argument as follows:

File "/Users/xxx/xxxx/label-maker/label_maker/download.py", line 32, in download_mbtiles
    w.write(r.read())
OSError: [Errno 22] Invalid argument

after the mbtiles has showed be downloaded.

drewbo commented 6 years ago

@Geoyi do you know if you had available space on machine? Is there any else specific about your machine configuration that might make this fail? I wasn't able to reproduce

Geoyi commented 6 years ago

@drewbo, I actually have about 96G on my machine. If I change to another country with a different bounding box, it works, but it just did not work for united_states_of_america if you and Mark could create and fetch the data without the problem, I think we could close this issue up.

drewbo commented 6 years ago

Ah sorry, I actually had a failure in another window. I can reproduce. The file is likely too large after unzipping to read/write properly in the currently implementation.

Ashot-KR commented 6 years ago

same for russia

Ashot-KR commented 6 years ago

@Geoyi as temporary solution you may download mbtiles directly https://s3.amazonaws.com/mapbox/osm-qa-tiles-production/latest.country/united_states_of_america.mbtiles.gz it works for me

Geoyi commented 6 years ago

Thanks, @Ashot-KR, glad that works for your case.

drewbo commented 6 years ago

Closed via #47