Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

HTTP Exception 401 #50

Open
dariomarciano opened this issue Apr 11, 2023 · 3 comments
Open

HTTP Exception 401 #50

dariomarciano opened this issue Apr 11, 2023 · 3 comments

Comments

@dariomarciano
Copy link

Hi, the bot logs in successfully, but running a /mj_image command results in a 401 exception.
Both DaVinci and Salai are running on administrator privileges.
I didn't modify the code except for the first 4 constants in global.py
Is this working for you guys?

@Wildric-Auric
Copy link
Owner

Well show us a screenshot of the error.

@dariomarciano
Copy link
Author

Not really much to screenshot, here's what happens:
I run python main.py, bot prints:
Logged in as pyDiscordReader#9103
then i type /mj_imagine test in discord, bot prints:
{"message": "401: Unauthorized", "code": 0}
my guess is, it's from this lines of code in mj_imagine (26-28):
if response.status_code >= 400:
print(response.text)
print(response.status_code)
so my question is since both DaVinci and Salai are admins on my server, and there's just the 2 + midjourney bot in the channel, what further authorization do I need to make it work? does it work for you right now or is it blocked?

@Wildric-Auric
Copy link
Owner

Double check your "Salai" token.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants