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 collapses after command call, worked before update. #2318

Closed
3 tasks done
ghost opened this issue Aug 19, 2019 · 2 comments
Closed
3 tasks done

Bot collapses after command call, worked before update. #2318

ghost opened this issue Aug 19, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 19, 2019

Summary

discord.log
I also asked around on the discord server, unfortunately they were unable to solve it.
I was also recommended to update to the Git version which did not work.
I tried to roll back to previous version but the problem carried over, i am now stuck.

Reproduction Steps

I updated discord.py from 1.x.x to 1.2

Expected Results

I expected the bot to work

Actual Results

The bot errors and collapses with every and any command call

(bot-env) ~/Documents/Discord Bot >>> python bot.py
We have logged in as Uniform#5344
The Bot is Online
Ignoring exception in command _help:
Traceback (most recent call last):
File "/home/george/Documents/Discord Bot/bot-env/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "bot.py", line 126, in _help
await ctx.send(f"Here you go!", embed=embed)
File "/home/george/Documents/Discord Bot/bot-env/lib/python3.7/site-packages/discord/abc.py", line 824, in send
data = await state.http.send_message(channel.id, content, tts=tts, embed=embed, nonce=nonce)
File "/home/george/Documents/Discord Bot/bot-env/lib/python3.7/site-packages/discord/http.py", line 222, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 411 Length Required (error code: 0):

<title>Error 411 (Length Required)!!1</title> <style> *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style>

411. That’s an error.

POST requests require a Content-length header. That’s all we know.

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

Traceback (most recent call last):
File "/home/george/Documents/Discord Bot/bot-env/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 891, in invoke
await ctx.command.invoke(ctx)
File "/home/george/Documents/Discord Bot/bot-env/lib/python3.7/site-packages/discord/ext/commands/core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/george/Documents/Discord Bot/bot-env/lib/python3.7/site-packages/discord/ext/commands/core.py", line 88, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 411 Length Required (error code: 0):

<title>Error 411 (Length Required)!!1</title> <style> *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style>

411. That’s an error.

POST requests require a Content-length header. That’s all we know.

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

  • Python v3.7.4-final
  • discord.py v1.3.0-alpha
    • discord.py pkg_resources: v1.3.0a2084+g87c2508
  • aiohttp v3.5.4
  • websockets v6.0
  • system info: Linux 5.2.8-1-MANJARO Fix issue with author changing type #1 SMP PREEMPT Fri Aug 9 19:34:20 UTC 2019
@Rapptz
Copy link
Owner

Rapptz commented Aug 19, 2019

The logs seem to indicate an issue with cloudflare, not really one I can deal with.

The stuff pasted in here seems to a bit peculiar since Content-Length is done automatically by aiohttp. I don't think there's any particular issue with 3.5.4 since I use that version personally so it's not a dependency issue.

I suggest contacting support over this since there's nothing I can do about this.

@Rapptz Rapptz closed this as completed Aug 19, 2019
@Harmon758
Copy link
Contributor

Note, you're likely encountering #2135.

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