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
RasterIO 1.1.2 'Int64' KeyError When Creating COG file from Jp2 #115
Comments
Hi @sachsbl thanks for opening this issue. This is a rasterio error, because The error message says Lines 258 to 259 in 2d4f633
I guess we could maybe fix this by casting the mask to |
FYI, I was able to reproduce this error on my mac using gdal2.4 too. I guess this is due to recent change in rasterio: rasterio/rasterio@1830c6b cc @sgillies (FYI) |
This will be fixed in rasterio 1.1.3 per rasterio/rasterio@07d47ef Thanks again for the report @sachsbl |
thanks for the investigation @vincentsarago! I will await 1.1.3 |
Well in fact I'm going to push a quick fix including changes from #114 so we don't have to wait for rasterio :-) |
So when RasterIO updated to 1.1.2 (December 18th), I started seeing things breaking that worked fine before. Specifically, converting any Sentinel2 jp2 files to COG. I see this error:
File "/usr/lib/python3.7/site-packages/rio_cogeo/cogeo.py", line 259, in cog_translate tmp_dst.write_mask(mask_value, window=w) File "rasterio/_io.pyx", line 1630, in rasterio._io.DatasetWriterBase.write_mask File "rasterio/shim_rasterioex.pxi", line 52, in rasterio._shim.io_band KeyError: 'int64'
This issue is environment specific. On my MacOS (Catalina), this works fine. However, this error occurs when the same code is run against Alpine Linux. Specifically I am using the docker image
osgeo/gdal:alpine-normal-3.0.2
, which has Python 3.7.5 and GDAL 3.0.2. Again, same setup locally on MacOS works fine. And the same code works fine on Alpine Linux at RasterIO 1.1.1. All of this is latest rio_cogeo. Any insight here would be appreciated!The text was updated successfully, but these errors were encountered: