Embed Scheme is 'none'
See original GitHub issueSummary
Sending embeds is broken for new discord version (1.6 -> 1.7.1)
Reproduction Steps
My bot used to work before with version 1.6. After upgrading to 1.7.1, all embeds fail to send with the same stack trace.
Minimal Reproducible Code
No response
Expected Results
The embed should be sent correctly. Screenshot of the expected result
Actual Results
Fails with the following stacktrace
ERROR:asyncio:_ClientEventTask exception was never retrieved
future: <ClientEventTask state=finished event=on_command_error coro=<function on_command_error at 0x7fadc1af0c10> exception=HTTPException('400 Bad Request (error code: 50035): Invalid Form Body\nIn embed.url: Scheme "none" is not supported. Scheme must be one of (\'http\', \'https\').')>
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "bot.py", line 337, in on_command_error
await ctx.guild.get_channel(ADMIN_CHANNEL_ID).send(embed=embed)
File "/app/.heroku/python/lib/python3.8/site-packages/discord/abc.py", line 1064, in send
data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
File "/app/.heroku/python/lib/python3.8/site-packages/discord/http.py", line 254, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embed.url: Scheme "none" is not supported. Scheme must be one of ('http', 'https').
Intents
members
System Information
What works:
~ $ python -m discord -v
- Python v3.8.5-final
- discord.py v1.6.0-final
- aiohttp v3.7.4.post0
- system info: Linux 4.4.0-1086-aws #90-Ubuntu SMP Wed Feb 17 07:04:43 UTC 2021
What doesn’t work:
~ $ python -m discord -v
- Python v3.8.5-final
- discord.py v1.7.1-final
- aiohttp v3.7.4.post0
- system info: Linux 4.4.0-1086-aws #90-Ubuntu SMP Wed Feb 17 07:04:43 UTC 2021
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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
DiscordAPIError: Invalid Form Body embed.image.url: Scheme ...
You must provide an image url so instead of your current fetch where you try to get the image you have to provide...
Read more >Scheme has no Embedded Points - Math Stack Exchange
It's been a while since this question has been asked, nevertheless, let me try to give an answer: Indeed, a reduced scheme has...
Read more >Looking for embeddable scheme - Reddit
I've been looking for a Scheme distribution for embedding into a C++ ... so no fighting against the library to get it to...
Read more >Embedding - The CHICKEN Scheme wiki
Calling this function more than once has no effect. ... If threads have been spawned during earlier invocations of embedded Scheme code, then...
Read more >9 Embedding into a Program (BC) - Racket Documentation
To embed Racket CGC in a program, follow these steps: ... When an embedding application calls scheme_main_setup with a non-zero first argument, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These methods were not documented to accept None and were documented to be implicitly casted to
str
. There was a bug originally that didn’t do it at init time and I guess this caused an unfortunate bug to surface on your end.I don’t really consider it breaking since the documentation never mentioned it was okay to pass None.
Faced the same problem.
My old code:
Solution:
The code worked perfectly for a few years, don’t tell me it’s not a library problem. Thanks.