New version of click (8.x.x) may have been causing an issue with cog_translate
See original GitHub issueIssue Description
To re-create, run test:
$ pytest -k test_cog_translate_valid
rio_cogeo/cogeo.py:289: in cog_translate
with click.progressbar(wind, file=fout, show_percent=True) as windows: # type: ignore
.direnv/python-3.7.3/lib/python3.7/site-packages/click/_termui_impl.py:98: in __enter__
self.render_progress()
.direnv/python-3.7.3/lib/python3.7/site-packages/click/_termui_impl.py:220: in render_progress
echo(self.label, file=self.file, color=self.color)
.
.
.
> file.write(out) # type: ignore
E AttributeError: 'str' object has no attribute 'write'
.direnv/python-3.7.3/lib/python3.7/site-packages/click/utils.py:298: AttributeError
Locking down to click==7.1.2
seems to work around the issue:
$ pip install click==7.1.2
$ pytest -k test_cog_translate_valid
=============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.7.3, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/gcihj/Projects/_tools/rio-cogeo
plugins: cov-2.12.1
collected 74 items / 67 deselected / 7 selected
tests/test_cogeo.py ....... [100%]
================================================================================ warnings summary =================================================================================
../../../.pyenv/versions/3.7.3/lib/python3.7/importlib/_bootstrap.py:219
/Users/gcihj/.pyenv/versions/3.7.3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
return f(*args, **kwds)
rio_cogeo/profiles.py:184
/Users/gcihj/Projects/_tools/rio-cogeo/rio_cogeo/profiles.py:184: UserWarning: Non-standard compression schema: webp. The output COG might not be fully supported by software not build against latest libtiff.
" supported by software not build against latest libtiff.".format(key)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
================================================================== 7 passed, 67 deselected, 2 warnings in 1.66s =====
Maybe a simple fix for now is to modify requirements.txt
:
https://github.com/cogeotiff/rio-cogeo/blob/b1c3692b5adaa456dbc565860e9fa26453c5ad10/requirements.txt#L1-L5
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Changes — Click Documentation (8.1.x)
Version 2.6¶. Released 2014-08-11. Fixed an issue where the wrapped streams on Python 3 would be reporting incorrect values for seekable.
Read more >DTrack2 User Manual V2.12.0 ART DTrack 2.12
are ok). ... no one can stumble over the cords, ... the cords cannot be damaged, ... the cords cannot damage the cameras...
Read more >2020年02月29日到期删除的国际域名
... account-information-update.org account-information.net ... bdzuv.com be-brave.tv be-connect-jp.com be-inapp.com be-supportive.com ...
Read more >Dropped 02-29-2020-COM - Domain Data - NameDog
... 8-5-6.com 8-bitsoft.com 8-four.com 8-landing-page-templates.com ... ay-hm-be.com ayahuasca-trip.com ayaladesigns.com ayaplumbing.com ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@vincentsarago
yep, I was going to push this fix! I’ll cc you in the PR and wait for your 👍