added better error handling when failure to connect to server
This commit is contained in:
parent
e906b9da1d
commit
b421166b23
1 changed files with 2 additions and 1 deletions
|
|
@ -226,7 +226,8 @@ class StableDiffusion(commands.Cog):
|
|||
r = await resp.json()
|
||||
except Exception as error:
|
||||
await ctx.send("My image generation service may not be running.")
|
||||
self.bot.logger.exception("Error in imagine")
|
||||
self.bot.logger.exception("Error with connection to image generation service")
|
||||
return
|
||||
|
||||
for i in r['images']:
|
||||
image = Image.open(io.BytesIO(base64.b64decode(i.split(",", 1)[0])))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue