Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot erroring out* #2

Closed
cyberofficial opened this issue Oct 21, 2022 · 3 comments
Closed

Bot erroring out* #2

cyberofficial opened this issue Oct 21, 2022 · 3 comments

Comments

@cyberofficial
Copy link
Contributor

Regarding the comment from 8534a11#commitcomment-87409492

My issue

Request -- cyber_official#0001 -- Prompt: a giant egg
Ignoring exception in command draw:
Traceback (most recent call last):
  File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\commands\core.py", line 124, in wrapped
    ret = await coro(arg)
  File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\commands\core.py", line 970, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "Y:\stablediff\aiyabot\core\stablecog.py", line 134, in dream_handler
    PayloadFormatter.do_format(self, PayloadFormatter.PayloadFormat.TXT2IMG)
  File "Y:\stablediff\aiyabot\core\PayloadFormatter.py", line 47, in do_format
    dependenciesjson = responsestr["dependencies"]
KeyError: 'dependencies'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\bot.py", line 1088, in invoke_application_command
    await ctx.command.invoke(ctx)
  File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\commands\core.py", line 374, in invoke
    await injected(ctx)
  File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\commands\core.py", line 132, in wrapped
    raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: KeyError: 'dependencies'

I have tried to use the suggested commit, and bot still doesn't run

@cyberofficial cyberofficial changed the title dependenciesjson = responsestr["dependencies"] erroring out Bot erroring out* Oct 21, 2022
@cyberofficial
Copy link
Contributor Author

Solved my issue
Pull Request: #3

@Kilvoctu
Copy link
Owner

Awesome! I tested the pull request in local and gradio login, and it seems all good for me, too. I'll go ahead and merge it.

That said, how did you fix the KeyError? I'm not sure where it's addressed in the PR.

@cyberofficial
Copy link
Contributor Author

Awesome! I tested the pull request in local and gradio login, and it seems all good for me, too. I'll go ahead and merge it.

That said, how did you fix the KeyError? I'm not sure where it's addressed in the PR.

😅 Well you see, funny thing; It was an invisible thing. Some how there was a Unix New Line crlf right here.
opera_LoWwPB7mHC

When I pushed a commit it said there was unix and windows new lines mixed and it showed where it was. So in the process of adding gradio support, it also squashed the key error.

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

No branches or pull requests

2 participants