#๐ error sending image in embed getting error
29 messages ยท Page 1 of 1 (latest)
@ornate fog
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
but i can get the image but not sned it in a embed
whatever description['localized_title_image'][0] is, it's not a valid url path
the rest of the url looks fine, so the problem must be in description['localized_title_image'][0], which you have conveniently omitted from your post
but when i print out image = f"https://clan.cloudflare.steamstatic.com/images/42849803/{description['localized_title_image'][0]}
it gives me a link and when i click it
it opens the image i want
ok
ill send the code
image = f"https://clan.cloudflare.steamstatic.com/images/42849803/{description['localized_title_image'][0]}"
embed = discord.Embed(title=data[0], description=data[3],
color=discord.Colour.orange(), )
embed.add_field(name=f"Posted: {data[1]}", value=f"[The-Finals-News-And-Patches]({data[2]})")
embed.set_thumbnail(
url='https://cdn2.steamgriddb.com/logo_thumb/3dcf08bb1312cd37914637289ba97421.png')
embed.set_image(url=image)
this si the code
and i get this error
File "C:\Users\pinhe\pythonProject23\.venv\Lib\site-packages\discord\ext\tasks\__init__.py", line 264, in _loop
raise exc
File "C:\Users\pinhe\pythonProject23\.venv\Lib\site-packages\discord\ext\tasks\__init__.py", line 239, in _loop
await self.coro(*args, **kwargs)
File "C:\Users\pinhe\pythonProject23\discordbot.py", line 68, in check_for_patch
await target_channel.send(embed=embed)
File "C:\Users\pinhe\pythonProject23\.venv\Lib\site-packages\discord\abc.py", line 1561, in send
data = await state.http.send_message(channel.id, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pinhe\pythonProject23\.venv\Lib\site-packages\discord\http.py", line 745, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.image.url: Not a well formed URL.```
where are you printing the image url?
im printing it by saying print(image) but what gives me the error is this part embed.set_image(url=image)
any ideas on how i can fix this?
Send just plain url
Im from phone so i cant copy
ok ill try
Try what
Send url
For future: for better help join dpy server itself: https://discord.gg/r3sSKJJ
send what url?
the image url is https://clan.cloudflare.steamstatic.com/images/42849803/8b759d154c74a9e07277d74113ecd989fbc65ee0.jpg
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.