-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'get_terminal_size' from 'click.termui' #106
Comments
Could you please test this branch - https://github.com/adieyal/sd-dynamic-prompts/tree/bug/typer-dependency |
I hope I can download the zip and extract the contents of the parent directory to the relevant directory in the extensions directory (moved previous files/dirs to a backup directory) and re-launch :-P I would assume that should work. About to test; thanks for quick response! |
Same error...:( |
I don't know much about GIT, but the hidden '.git' directory was the only item that was with the old files that is not in the directory after copying the bug fix and killing/launching. |
I assume that has to do with the 'git pull' command though...which would explain why it's non-existent now. |
Have: click 8.1.3 installed |
What command did you use to get the versions? |
Yes, that should work, in fact only the install.py file changed so you can update that instead of updating the entire directory |
Python is in my PATH, so I just did "pip list" in Windows Command Prompt. Maybe that's not the relevant info relative to the WebUI directory/VENV? |
Maybe Spacy has something to do with it? https://bobbyhadz.com/blog/python-importerror-cannot-import-name-get-terminal-size-from-click-termui |
Still haven't figured anything out to solve this....all I've found is posts referencing an older update to Click and Typer, but nothing regarding the versions that are being used (on my machine, at least). I also forced Spacy to update, and it did, but still the same error :-(
(from fastapi/typer#375) Well, I'm on Click v8.1.3 and Typer v0.7.0, so what the heck? Plus, 'Dynamic Prompts' WAS working previously (like a week ago) with Automatic1111's WebUI. |
that's strange - typer 0.7.0 should fix the issue. It could be the case that I have made a small change to install.py. Try downloading it using this link and replacing your currently version. Let me know if that works. |
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! |
That's awesome - sorry to hear that you struggled so much, glad it's working again. |
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:
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).
The text was updated successfully, but these errors were encountered: