mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-11-05 00:17:25 +00:00
[GH-ISSUE #250] Attempt to JSON.parse(opts['tac_keymap']), but opts['tac_keymap'] may sometimes be undefined #180
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#180
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 @ivucica on GitHub (Nov 5, 2023).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/250
Looks like
opts['tac_keymap']isundefinedon my machine, despite being set inconfig.json. This is true for a variety of other config options that seem like they should be inopts, especially alltac_settings.This means an attempt to
JSON.parse(opts['tac_keymap'])fails here: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/blob/main/javascript/tagAutocomplete.js#L253This happens even after disabling every other extension except for
a1111-sd-webui-tagcomplete.This is on webui tag
v1.6.0,5ef669de080814067961f28357256e8fe27544f4, from Aug 31 -- the latest ~stable release. I've tried several stable tags ofa1111-sd-webui-tagcomplete, but given git blame says those lines are from 8mo ago, I suspect something changed in a1111 rather than in the extension.Could this be the cause of #231? Is
optsthe right place this was meant to be read from? Should I just roll forward beyond a1111 1.6.0?@ivucica commented on GitHub (Nov 5, 2023):
(This is not the cause of #231 in my case -- for me, it was that a
.safetensorsfile was, inexplicably, a directory rather than a file. I'll open a new bug for that issue.)@ivucica commented on GitHub (Nov 5, 2023):
Failed extension startup in Python code may cause breakage in Javascript as well. This might be closeable in favor of #251 since the extension should not fail to start up, or it should perhaps be otherwise addressed (e.g. detecting that
optsis incomplete and performing some other action instead of passing an undefined object intoJSON.parse).@DominikDoom commented on GitHub (Nov 5, 2023):
Opts will never be incomplete during normal operation, since all options have a default provided in the python code that will fill them in even if not set by the user. As you already mentioned yourself, this is just because the python error you linked prevents it from even getting far enough to declare the options.
Breaking is the correct thing here, there's literally no way for the extension to function if the options are missing since they define everything. The javascript side does not declare its own option defaults since they would just be redundant under normal circumstances. But of course I'll try to fix the root issue.