Closed ChucklesTheBeard closed 1 year ago
You are right, if the Web UI is not active, then AIYA will crash immediately. I've been meaning to put in a safety check, but I kept putting it off. It should be pretty simple to put in (an early version of AIYA did have a safety check actually), thanks for bringing it up.
All right, I pushed an update to have a checker for Web UI. She'll patiently wait for a connection and put out a message every 20s Once a connection is made, then it'll proceed like normal.
The URL displayed is what's entered into the .env file.
For --share
users I know it's not perfect, since the URL is unknown until Web UI is launched, but it should be helpful to know when the Web UI is unreachable.
It now waits for the main web ui to load, but not the api; if auto1111 is launched without --api
, aiyabot will currently (edit: updated to 6ab86b2865d2745251caeb117382564df3179bf4 ) crash and disappear entirely when launched from explorer -> launch.bat, or show the following unhelpful error if launched from command prompt
Traceback (most recent call last):
File "C:\sd\aiyabot\aiya.py", line 20, in <module>
settings.files_check()
File "C:\sd\aiyabot\core\settings.py", line 155, in files_check
global_var.sampler_names.append(s1['name'])
TypeError: string indices must be integers
If launched without --api
auto1111 will return {"detail":"Not Found"}
at several endpoints including GET /sdapi/v1/options
- this could be used to show a specific error and not proceed until the api is set up correctly.
I would hope that people are reading the setup instructions in the readme lol. 😅
I've added a simple check for the API. It'll try to get a response from one of the API endpoints; I chose one at random. If response is 404 / not found, then we get this Then aiyabot closes. I tried a few ways to get it to wait like it does for general Web UI connection but was unsuccessful, so this is what I'm going with.
You'd think so! Experience has taught me otherwise! :)
Solid error messages are also super useful for idiots like me who play with lots of different settings;
"I read the setup instructions when I originally set it up, sure, but now I want to use it again and it keeps crashing with this obscure error, wat do?"
Looks good, thank you!
Was there anything else, or do you think this particular issue is good to close? I just want to make sure.
just couldn't close via email and haven't checked this account recently <3
fresh install excluding
.env
which sets a URL and discord token.Python 3.10.6 Windows 10 Pro, 21H1
Solution: ...this is apparently what a connection problem looks like. Remember to launch a1111 with
--listen --api
etc...Leaving the issue open - this needs a safety check to make sure it can talk to the api, and it needs to throw a reasonable error (ideally without immediately exiting when launched by double-clicking the .bat).