stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Failure to import Roboto font prevents application from running

Open Sophronius opened this issue 2 years ago • 1 comments

Describe the bug Launching webui-user.bat outputs an error

To Reproduce Steps to reproduce the behavior: ??????????

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Console Output (Conda, but cmd output is the same) ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

(artbot) R:\PF[A]\AI\stable-diffusion-webui>webui-user.bat venv "R:\PF[A]\AI\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.6 | packaged by conda-forge | (main, Oct 7 2022, 20:14:50) [MSC v.1916 64 bit (AMD64)] Commit hash: f7c787eb7c295c27439f4fbdf78c26b8389560be Installing requirements for Web UI Launching Web UI with arguments: --medvram Traceback (most recent call last): File "R:\PF[A]\AI\stable-diffusion-webui\launch.py", line 152, in start_webui() File "R:\PF[A]\AI\stable-diffusion-webui\launch.py", line 148, in start_webui import webui File "R:\PF[A]\AI\stable-diffusion-webui\webui.py", line 12, in import modules.extras File "R:\PF[A]\AI\stable-diffusion-webui\modules\extras.py", line 9, in from modules import processing, shared, images, devices, sd_models File "R:\PF[A]\AI\stable-diffusion-webui\modules\processing.py", line 19, in import modules.images as images File "R:\PF[A]\AI\stable-diffusion-webui\modules\images.py", line 11, in from fonts.ttf import Roboto ImportError: cannot import name 'Roboto' from 'fonts.ttf' (R:\PF[A]\AI\stable-diffusion-webui\venv\lib\site-packages\fonts\ttf_init_.py) Press any key to continue . . .

(artbot) R:\PF[A]\AI\stable-diffusion-webui>pip install font-roboto Requirement already satisfied: font-roboto in c:\users<my username>.conda\envs\artbot\lib\site-packages (0.0.1)

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

OS: Win10 Hash: f7c787eb7c295c27439f4fbdf78c26b8389560be Tested both with conda and native python

Sophronius avatar Oct 08 '22 01:10 Sophronius

same error on windows 11 cmd, output is similar but not the same.

venv "D:[IA]\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Commit hash: df0a1f83815c771246a7b1bca85d63feaefad8d1 Installing requirements for Web UI Launching Web UI with arguments: Traceback (most recent call last): File "D:[IA]\stable-diffusion-webui\launch.py", line 206, in start_webui() File "D:[IA]\stable-diffusion-webui\launch.py", line 200, in start_webui import webui File "D:[IA]\stable-diffusion-webui\webui.py", line 12, in from modules import devices, sd_samplers, upscaler File "D:[IA]\stable-diffusion-webui\modules\sd_samplers.py", line 10, in from modules import prompt_parser, devices, processing, images File "D:[IA]\stable-diffusion-webui\modules\processing.py", line 14, in import modules.sd_hijack File "D:[IA]\stable-diffusion-webui\modules\sd_hijack.py", line 10, in import modules.textual_inversion.textual_inversion File "D:[IA]\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 17, in from modules.textual_inversion.image_embedding import (embedding_to_b64, embedding_from_b64, File "D:[IA]\stable-diffusion-webui\modules\textual_inversion\image_embedding.py", line 6, in from fonts.ttf import Roboto ImportError: cannot import name 'Roboto' from 'fonts.ttf' (D:[IA]\stable-diffusion-webui\venv\lib\site-packages\fonts\ttf_init_.py) Press any key to continue . . .

Lynkes avatar Oct 25 '22 01:10 Lynkes

@Lynkes @Sophronius Remove "[ ]" from your folder names.( ̄︶ ̄)↗ 

ivAkii avatar Nov 16 '22 16:11 ivAkii

@Lynkes @Sophronius Remove "[ ]" from your folder names.( ̄︶ ̄)↗ 

Yea that fix's It, i found out on another thread already but tnx for the reply.

Lynkes avatar Nov 16 '22 16:11 Lynkes

@Lynkes @Sophronius Remove "[ ]" from your folder names.( ̄︶ ̄)↗

Yea that fix's It, i found out on another thread already but tnx for the reply.

could you pls tell me the other thread? i checked my folder name,there is no'[]',and i cant find the solution.

pangzhilei avatar Mar 01 '23 07:03 pangzhilei

Don't know what thread it was, but try to do a git clone of stable defusion on the root folder of your drive and run the webui-user.bat without administrator privileges.

Lynkes avatar Mar 01 '23 11:03 Lynkes