Closed ghelobytes closed 3 years ago
thanks @ghelobytes for the report, my co-worked just mentioned this to me and it all comes down to the latest rasterio update ref: https://github.com/mapbox/rasterio/pull/2191
I'll try to fix this tomorrow
@ghelobytes I'm not able to reproduce the issue. can you share the click and rasterio version that you have?
@vincentsarago
>>> import rio_cogeo, click, rasterio
>>> print(rio_cogeo.__version__)
2.2.2
>>> print(click.__version__)
8.0.1
>>> print(rasterio.__version__)
1.2.4
>>>
From the latest click
doc, it looks like it's now expecting a stream (TextIO
):
file (Optional[TextIO]) – The file to write to. If this is not a terminal then only the label is printed.
This seems to work when I change the line below to this: fout = open(os.devnull, 'w') if quiet else sys.stderr
but not sure if that's the appropriate thing to do.
https://github.com/cogeotiff/rio-cogeo/blob/b1c3692b5adaa456dbc565860e9fa26453c5ad10/rio_cogeo/cogeo.py#L288-L290
yep, I was going to push this fix! I'll cc you in the PR and wait for your 👍
To re-create, run test:
Locking down to
click==7.1.2
seems to work around the issue:Maybe a simple fix for now is to modify
requirements.txt
: https://github.com/cogeotiff/rio-cogeo/blob/b1c3692b5adaa456dbc565860e9fa26453c5ad10/requirements.txt#L1-L5