Skip to content
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

Error with file path when generating. #2

Open
rustylez opened this issue Apr 25, 2023 · 1 comment
Open

Error with file path when generating. #2

rustylez opened this issue Apr 25, 2023 · 1 comment

Comments

@rustylez
Copy link

Everytime when i try to generate an image, i get an error, maybe you know how to fix this?
To show you, i just used the prompt "a cute cat" and clicked generate, then the bot breaks off at 25% and this is the message i get in automatic1111 cmd:

API error: POST: http://127.0.0.1:7860/sdapi/v1/txt2img {'error': 'FileNotFoundError', 'detail': '', 'body': '', 'errors': "[WinError 3] Das System kann den angegebenen Pfad nicht finden: ''"}
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
 C:\Users\Shadow\SD\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py:94 in receive               
                                                                                                                      
 C:\Users\Shadow\SD\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py:89 in receive_nowait        
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
WouldBlock

During handling of the above exception, another exception occurred:

╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
 C:\Users\Shadow\SD\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py:78 in call_next        
                                                                                                                      
 C:\Users\Shadow\SD\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py:114 in receive              
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
EndOfStream

During handling of the above exception, another exception occurred:

╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
 C:\Users\Shadow\SD\stable-diffusion-webui\modules\api\api.py:145 in exception_handling                               
                                                                                                                      
   144       try:                                                                                                   
  145          return await call_next(request)                                                                    
   146       except Exception as e:                                                                                 
                                                                                                                      
 ╭────────────────────────────────────────────── locals ──────────────────────────────────────────────╮               
         call_next = <function BaseHTTPMiddleware.__call__.<locals>.call_next at 0x0000024B5BF5E950>                
                 e = FileNotFoundError(2, 'Das System kann den angegebenen Pfad nicht finden')                      
  handle_exception = <function api_middleware.<locals>.handle_exception at 0x0000024B5AA0DFC0>                      
           request = <starlette.requests.Request object at 0x0000024B5BE26740>                                      
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯               
                                                                                                                      
 C:\Users\Shadow\SD\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py:84 in call_next        
                                                                                                                      
                                               ... 23 frames hidden ...                                               
                                                                                                                      
 C:\Users\Shadow\SD\stable-diffusion-webui\modules\images.py:502 in save_image                                        
                                                                                                                      
   501                                                                                                               
  502    os.makedirs(path, exist_ok=True)                                                                           
   503                                                                                                                
                                                                                                                      
 ╭──────────────────────────────────────────────────── locals ────────────────────────────────────────────────────╮   
              basename = ''                                                                                         
         existing_info = None                                                                                       
             extension = 'webp'                                                                                     
       forced_filename = None                                                                                       
                  grid = False                                                                                      
                 image = <PIL.Image.Image image mode=RGB size=512x512 at 0x24B5ACC6E30>                             
                  info = 'a cute cat\nNegative prompt: ugly, tiling, poorly drawn hands, poorly drawn feet,'+389    
               namegen = <modules.images.FilenameGenerator object at 0x0000024B5ACC56F0>                            
             no_prompt = False                                                                                      
                     p = <modules.processing.StableDiffusionProcessingTxt2Img object at 0x0000024B5BF52FE0>         
                  path = ''                                                                                         
  pnginfo_section_name = 'parameters'                                                                               
                prompt = 'a cute cat'                                                                               
          save_to_dirs = False                                                                                      
                  seed = 4105437904                                                                                 
        short_filename = False                                                                                      
                suffix = ''                                                                                         
 ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯   
                                                                                                                      
 C:\Users\Shadow\AppData\Local\Programs\Python\Python310\lib\os.py:225 in makedirs                                    
                                                                                                                      
    224    try:                                                                                 ╭──── locals ─────╮  
   225       mkdir(name, mode)                                                                 exist_ok = True   
    226    except OSError:                                                                           head = ''     
                                                                                                      mode = 511    
                                                                                                      name = ''     
                                                                                                      tail = ''     
                                                                                                 ╰─────────────────╯  
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht finden: ''

(Ps.: "Das System kann den angegebenen Pfad nicht finden: " just means "The system cannot find the specified path:" in german.)

@shtrih
Copy link
Owner

shtrih commented May 4, 2023

images.py:502 in save_image

At the moment it saves all generated images on server too, so I assume your a1111 folder settings may be cause of this error. Check Settings tab → Saving images/gridsOutput directory for ...:

chrome_2023-05-04_12-20-46
@rustylez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants