mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-11-05 00:17:25 +00:00
[GH-ISSUE #308] YAML file misinterpreted as wildcard (TypeError: list indices must be integers or slices, not dict) #215
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
low priority
low priority
pull-request
question
waiting for feedback
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DominikDoom/a1111-sd-webui-tagcomplete#215
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @faustoserone on GitHub (Nov 2, 2024).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/308
Hi,
I haven't used A1111 for a couple of months.
Today I updated it and I got the following error:
*** Error loading script: tag_autocomplete_helper.py
Traceback (most recent call last):
File "G:\stable-diffusion-webui\modules\scripts.py", line 515, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "G:\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 535, in
write_temp_files()
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 505, in write_temp_files
get_yaml_wildcards()
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 180, in get_yaml_wildcards
if (is_umi_format(data)):
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 137, in is_umi_format
if not (data[item] and 'Tags' in data[item] and isinstance(data[item]['Tags'], list)):
TypeError: list indices must be integers or slices, not dict
can you help me please? thank you.
@DominikDoom commented on GitHub (Nov 2, 2024):
It seems you have a YAML file somewhere that TAC thinks is a specific format of wildcard list but fails to parse it as such (likely located in another extension). Normally it should already ignore errors that happen there, but it seems this failed for your affected file. I pushed a probable fix that should catch this error as well, can you please update the extension and tell me if it helped you?
@faustoserone commented on GitHub (Nov 2, 2024):
unfortunately it doesn't work, but it seems to have changed the error report slightly:
*** Error loading script: tag_autocomplete_helper.py
Traceback (most recent call last):
File "G:\stable-diffusion-webui\modules\scripts.py", line 515, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "G:\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 539, in
write_temp_files()
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 509, in write_temp_files
get_yaml_wildcards()
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 187, in get_yaml_wildcards
parse_dynamic_prompt_format(yaml_wildcards, data, path)
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 163, in parse_dynamic_prompt_format
recurse_dict(data)
File "G:\stable-diffusion-webui\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 157, in recurse_dict
for key, value in d.copy().items():
AttributeError: 'list' object has no attribute 'items'
@faustoserone commented on GitHub (Nov 2, 2024):
I removed all the YAML files and it works.
@DominikDoom commented on GitHub (Nov 2, 2024):
Ah I see, now it's the other YAML format that breaks. I pushed another fix, that should really cover all YAML file problems.
You can put the files back and it should log which file was the issue now.
@faustoserone commented on GitHub (Nov 2, 2024):
No error log. Now it works! Thank you very much <3