Kilvoctu / aiyabot

A neat Discord bot for AUTOMATIC1111's Web UI
GNU General Public License v2.0
305 stars 79 forks source link

Crash on startup #205

Open Blazeolmo opened 11 months ago

Blazeolmo commented 11 months ago

Describe the bug
On a fresh install, without any parameters on the webui except for --api, without any change to aiya, using launch.bot just checks that everything is installed and then crashes


Environment Windows 10 22h2


Console logs
Closes too fast for me to be able to capture it, from what i've seen it's just "this has already been installed, that has already been installed"

solareon commented 11 months ago

@Blazeolmo try running the launch.bat from a command prompt in the folder where Aiyabot is installed. You should be able to shift + right click and open a powershell/command prompt in that folder. Did you provide Aiyabot with the appropriate discord tokens?

maz-net-au commented 11 months ago

I get this. I have added the token in the .env file. Fresh install.


Traceback (most recent call last):
  File "C:\aiyabot\aiya.py", line 5, in <module>
    from core import ctxmenuhandler
  File "C:\aiyabot\core\ctxmenuhandler.py", line 7, in <module>
    from core import settings
  File "C:\aiyabot\core\settings.py", line 11, in <module>
    from core import queuehandler
  File "C:\aiyabot\core\queuehandler.py", line 81, in <module>
    class GlobalQueue:
  File "C:\aiyabot\core\queuehandler.py", line 84, in GlobalQueue
    queue: list[DrawObject | UpscaleObject | IdentifyObject] = []
TypeError: unsupported operand type(s) for |: 'type' and 'type'
Blazeolmo commented 11 months ago

running from powershell doesn't change anything. i gave it the discord client secret in this format:

TOKEN = thetokenhere

and made it an .env file, exactly as written in the instructions.

Blazeolmo commented 11 months ago

i also tried running aiya.py from the powershell and it closes immediately. that was kinda expected since the launch.bat just checks if you have everything installed, installs if not, then runs aiya.py

maz-net-au commented 11 months ago

So I'm not really a python user but here's what I found for my error. Despite having python 3.10 installed, it was using 3.9. The line that was throwing the error for me was because of union type hinting which isn't supported before 3.10. I updated my system to use a newer version and that solved my problem, but i believe i could have also used the py -3.10 launcher inside launch.bat where it says python.exe and that would have also worked.

tl;dr try update your python. if you run python --version and it says anything < 3.10, its not going to work