Closed chufanwsh closed 6 months ago
You have included a stack trace that has nothing to do with pyright. You have not explained how you're running pyright (as a CLI, in VS Code, in another editor, etc.). You have not provided any details about the code you're running pyright on. Please do not file additional bug reports of this nature. If you think that pyright might be in error, make sure to follow the instructions in the bug template and provide all of the requested information.
You mentioned that you're seeing a pyright-generated error. I presume that you are running pyright on your Python source code, and it is telling you that you have a type violation. That's the job of a static type checker. Since you haven't included a minimal, self-contained code sample, I can only guess at the cause of the error within your code. Based on the error message, it appears that you're attempting to reference an attribute via an object that could be None
at runtime. A type checker's job is to tell you about potential bugs like this so you can fix them.
For basic information about static type checking, please refer to the pyright documentation.
Stable Diffusion 运行环境: Stable Diffusion environment: version: [v1.8.0] • python: 3.10.11 • torch: 2.2.0+cu118 • xformers: 0.0.24+cu118 • gradio: 3.41.2 • checkpoint: [7c819b6d13]
引发错误的插件:sd-webui-prompt-all-in-one Plugins that cause errors:sd-webui-prompt-all-in-one
Webui page error message: webui页面错误信息:'NoneType' object has no attribute 'group'
控制台相关信息:(Console related information) *** API error: POST: http://127.0.0.1:7860/physton_prompt/token_counter {'error': 'TypeError', 'detail': '', 'body': '', 'errors': 'StableDiffusionModelHijack.get_prompt_lengths() takes 2 positional arguments but 3 were given'} Traceback (most recent call last): File "E:\sd-webui-aki-v4.7\python\lib\site-packages\anyio\streams\memory.py", line 94, in receive return self.receive_nowait() File "E:\sd-webui-aki-v4.7\python\lib\site-packages\anyio\streams\memory.py", line 89, in receive_nowait raise WouldBlock anyio.WouldBlock
在SD 程序正常启动后,在sd-webui-prompt-all-in-one工具默认的百度翻译设置下,点击翻译提示词,webui页面右上角会出现错误信息:'NoneType' object has no attribute 'group',控制台出现以上相关错误信息。可以正常生成图片,我是个新手,还请大家帮忙指导解决。感谢帮助。
After the SD program starts normally, in the default Baidu translation settings of the sd-webii prompt all in one tool, click on the translation prompt word. An error message will appear in the upper right corner of the webui page: 'NoneType' object has no attribute 'group', and the console will display the above related error messages. I am a beginner and can generate images normally. Could you please help me guide and solve the problem. Thank you for your help.