ImportError: cannot import name 'get_terminal_size' from 'click.termui'
See original GitHub issueDescribe the bug
Error running process: G:\StableDiffVoldy\stable-diffusion-webui\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py Traceback (most recent call last):   File "G:\StableDiffVoldy\stable-diffusion-webui\modules\scripts.py", line 338, in process     script.process(p, *script_args)   File "G:\StableDiffVoldy\stable-diffusion-webui\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py", line 350, in process     generator = self._create_generator(   File "G:\StableDiffVoldy\stable-diffusion-webui\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py", line 166, in _create_generator     generator = AttentionGenerator(generator)   File "G:\StableDiffVoldy\stable-diffusion-webui\extensions\sd-dynamic-prompts\prompts\generators\attentiongenerator.py", line 8, in __init__     import spacy   File "G:\StableDiffVoldy\stable-diffusion-webui\venv\lib\site-packages\spacy\__init__.py", line 15, in <module>     from .cli.info import info  # noqa: F401   File "G:\StableDiffVoldy\stable-diffusion-webui\venv\lib\site-packages\spacy\cli\__init__.py", line 3, in <module>     from ._util import app, setup_cli  # noqa: F401   File "G:\StableDiffVoldy\stable-diffusion-webui\venv\lib\site-packages\spacy\cli\_util.py", line 9, in <module>     import typer   File "G:\StableDiffVoldy\stable-diffusion-webui\venv\lib\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' (G:\StableDiffVoldy\stable-diffusion-webui\venv\lib\site-packages\click\termui.py)
To Reproduce Steps to reproduce the behaviour, include the prompt you used if applicable:
- Try to use ‘Dynamic Prompts’
 - See that nothing is happening to the results
 - See error in terminal
 
Tried all checkboxes individually.
Expected behaviour No error and proper results.
Additional context Obviously related to the Typer and Click packages, but can’t figure out what to do. People have solved it in the past by downgrading the Click package (from info on other repos).
Issue Analytics
- State:
 - Created 9 months ago
 - Comments:14 (5 by maintainers)
 

Top Related StackOverflow Question
That’s awesome - sorry to hear that you struggled so much, glad it’s working again.
@adieyal
Yesssss! Thank you so much for figuring that out for me…I spent most of last Saturday acting like I knew anything and just scrolled around in all of the files, looking for something that might stand out; no success, of course. That’s why we count on experts 😃 I had just begun using this extension a couple weeks ago and shortly after that it just threw an error on every attempt; thanks again!