[GH-ISSUE #66] Error loading script #50

Closed
opened 2026-10-30 21:17:54 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @tsound97 on GitHub (Nov 6, 2022).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/66

Originally assigned to: @DominikDoom on GitHub.

I use the colab version of lastben (https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Based on python3.7
Seems the extension can't read the correct path of the tag folder.
How to change the path?

Error loading script: tag_autocomplete_helper.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 170, in load_scripts
exec(compiled, module.dict)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete/scripts/tag_autocomplete_helper.py", line 77, in
write_tag_base_path()
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete/scripts/tag_autocomplete_helper.py", line 63, in write_tag_base_path
f.write(TAGS_PATH.relative_to(FILE_DIR).as_posix())
File "/usr/lib/python3.7/pathlib.py", line 900, in relative_to
.format(str(self), str(formatted)))
ValueError: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete/tags' does not start with '/content/gdrive/MyDrive/sd/stable-diffusion'

Originally created by @tsound97 on GitHub (Nov 6, 2022). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/66 Originally assigned to: @DominikDoom on GitHub. I use the colab version of lastben (https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb) Based on python3.7 Seems the extension can't read the correct path of the tag folder. How to change the path? Error loading script: tag_autocomplete_helper.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 170, in load_scripts exec(compiled, module.__dict__) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete/scripts/tag_autocomplete_helper.py", line 77, in <module> write_tag_base_path() File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete/scripts/tag_autocomplete_helper.py", line 63, in write_tag_base_path f.write(TAGS_PATH.relative_to(FILE_DIR).as_posix()) File "/usr/lib/python3.7/pathlib.py", line 900, in relative_to .format(str(self), str(formatted))) ValueError: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete/tags' does not start with '/content/gdrive/MyDrive/sd/stable-diffusion'
bsakaguchi 2026-10-30 21:17:54 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tsound97 commented on GitHub (Nov 6, 2022):

Also, the temp folder can't be created successfully.

ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/starlette/responses.py", line 331, in call
stat_result = await anyio.to_thread.run_sync(os.stat, self.path)
File "/usr/local/lib/python3.7/dist-packages/anyio/to_thread.py", line 32, in run_sync
func, *args, cancellable=cancellable, limiter=limiter
File "/usr/local/lib/python3.7/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.7/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/MyDrive/sd/stable-diffusion/tmp/tagAutocompletePath.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/uvicorn/protocols/http/h11_impl.py", line 405, in run_asgi
self.scope, self.receive, self.send
File "/usr/local/lib/python3.7/dist-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/fastapi/applications.py", line 270, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/applications.py", line 124, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/gzip.py", line 24, in call
await responder(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/gzip.py", line 43, in call
await self.app(scope, receive, self.send_with_gzip)
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/exceptions.py", line 75, in call
raise exc
File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/exceptions.py", line 64, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.7/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/usr/local/lib/python3.7/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 680, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 275, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 68, in app
await response(scope, receive, send)
File "/usr/local/lib/python3.7/dist-packages/starlette/responses.py", line 334, in call
raise RuntimeError(f"File at path {self.path} does not exist.")
RuntimeError: File at path /content/gdrive/MyDrive/sd/stable-diffusion/tmp/tagAutocompletePath.txt does not exist.

<!-- gh-comment-id:1304822962 --> @tsound97 commented on GitHub (Nov 6, 2022): Also, the temp folder can't be created successfully. ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/starlette/responses.py", line 331, in __call__ stat_result = await anyio.to_thread.run_sync(os.stat, self.path) File "/usr/local/lib/python3.7/dist-packages/anyio/to_thread.py", line 32, in run_sync func, *args, cancellable=cancellable, limiter=limiter File "/usr/local/lib/python3.7/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.7/dist-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/MyDrive/sd/stable-diffusion/tmp/tagAutocompletePath.txt' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/uvicorn/protocols/http/h11_impl.py", line 405, in run_asgi self.scope, self.receive, self.send File "/usr/local/lib/python3.7/dist-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__ return await self.app(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/fastapi/applications.py", line 270, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/applications.py", line 124, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/errors.py", line 184, in __call__ raise exc File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/gzip.py", line 24, in __call__ await responder(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/gzip.py", line 43, in __call__ await self.app(scope, receive, self.send_with_gzip) File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/exceptions.py", line 75, in __call__ raise exc File "/usr/local/lib/python3.7/dist-packages/starlette/middleware/exceptions.py", line 64, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.7/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__ raise e File "/usr/local/lib/python3.7/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 680, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 275, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/routing.py", line 68, in app await response(scope, receive, send) File "/usr/local/lib/python3.7/dist-packages/starlette/responses.py", line 334, in __call__ raise RuntimeError(f"File at path {self.path} does not exist.") RuntimeError: File at path /content/gdrive/MyDrive/sd/stable-diffusion/tmp/tagAutocompletePath.txt does not exist.
Author
Owner

@DominikDoom commented on GitHub (Nov 6, 2022):

The folders & files are loaded based on the script execution path. It seems that for this colab it for some reason launches the webui from a different folder which the webui extension script doesn't correctly return. try moving the tags and temp folder to the "stable-diffusion" folder in your drive instead of "stable-diffusion-webui" so it matches the path in the last line of the error messages.

<!-- gh-comment-id:1304823666 --> @DominikDoom commented on GitHub (Nov 6, 2022): The folders & files are loaded based on the script execution path. It seems that for this colab it for some reason launches the webui from a different folder which the webui extension script doesn't correctly return. try moving the tags and temp folder to the "stable-diffusion" folder in your drive instead of "stable-diffusion-webui" so it matches the path in the last line of the error messages.
Author
Owner

@tsound97 commented on GitHub (Nov 6, 2022):

I'll try it, thank you friend.

<!-- gh-comment-id:1304824381 --> @tsound97 commented on GitHub (Nov 6, 2022): I'll try it, thank you friend.
Author
Owner

@tsound97 commented on GitHub (Nov 6, 2022):

Still doesn't work, I'll use an old version of your script ( which works on this colab ). Thanks again.

<!-- gh-comment-id:1304827149 --> @tsound97 commented on GitHub (Nov 6, 2022): Still doesn't work, I'll use an old version of your script ( which works on this colab ). Thanks again.
Author
Owner

@DominikDoom commented on GitHub (Nov 6, 2022):

Alright. Thanks for the report, I'll look for a proper fix with the current version when I have time.

<!-- gh-comment-id:1304828454 --> @DominikDoom commented on GitHub (Nov 6, 2022): Alright. Thanks for the report, I'll look for a proper fix with the current version when I have time.
Author
Owner

@tsound97 commented on GitHub (Nov 7, 2022):

Solved by change the colab's code.
https://github.com/TheLastBen/fast-stable-diffusion/issues/409
All the best! 👍

<!-- gh-comment-id:1305031981 --> @tsound97 commented on GitHub (Nov 7, 2022): Solved by change the colab's code. https://github.com/TheLastBen/fast-stable-diffusion/issues/409 All the best! 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#50
No description provided.