question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name 'get_terminal_size' from 'click.termui'

See original GitHub issue

Describe 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:

  1. Try to use ‘Dynamic Prompts’
  2. See that nothing is happening to the results
  3. 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:closed
  • Created 9 months ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
adieyalcommented, Dec 16, 2022

That’s awesome - sorry to hear that you struggled so much, glad it’s working again.

0reactions
PhreakHeavencommented, Dec 16, 2022

@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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot import name 'get_terminal_size' from 'click.termui ...
First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't...
Read more >
cannot import name 'get_terminal_size' from 'click.termui ...
Using python lib typer throws an error.
Read more >
Cannot import name 'get_terminal_size' from 'click.termui'
The "ImportError: cannot import name 'get_terminal_size' from 'click.termui'" occurs because the get_terminal_size method has been removed starting click ...
Read more >
cannot import name 'get_terminal_size' from 'click.termui'
Importerror : cannot import name 'get_terminal_size' from 'click.termui' error occurs because of the incompatibility of typer module.
Read more >
cannot import name 'get_terminal_size' from 'click.termui'
Coding example for the question ImportError: cannot import name 'get_terminal_size' from 'click.termui'
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found