-
-
Notifications
You must be signed in to change notification settings - Fork 865
ImportError: cannot import name 'get_terminal_size' from 'click.termui' #377
Copy link
Copy link
Closed
robusta-dev/robusta
#378Labels
Description
First Check
- I added a very descriptive title to this issue.
- I used the GitHub search to find a similar issue and didn't find it.
- I searched the Typer documentation, with the integrated search.
- I already searched in Google "How to X in Typer" and didn't find any information.
- I already read and followed all the tutorial in the docs and didn't find an answer.
- I already checked if it is not related to Typer but to Click.
Commit to Help
- I commit to help with one of those options 👆
Example Code
import typerDescription
- Install latest versions of
typer(0.4.0) andclick(8.1.0) - Run script with single line
import typer - Import fails due to method
get_terminal_sizehaving been removed in click 8.1.0 (remove deprecated code pallets/click#2130)
Traceback (most recent call last):
File "test.py", line 1, in <module>
import typer
File "/.venv/lib/python3.8/site-packages/typer/__init__.py", line 12, in <module>
from click.termui import get_terminal_size as get_terminal_size
ImportError: cannot import name 'get_terminal_size' from 'click.termui' (/.venv/lib/python3.8/site-packages/click/termui.py)
Operating System
Linux
Operating System Details
Ubunutu 20.04
Typer Version
0.4.0
Python Version
Python 3.8.10
Additional Context
No response
Reactions are currently unavailable