python中意外的行后续字符

2024-06-09 10:29:12 发布

您现在位置:Python中文网/ 问答频道 /正文

上面写着这个错误:

    r = requests.post(webhookLink, data={"embeds":[{"title":\"webhookEmbedTitle\","description":\"webhookEmbedDescription\","color":webhookEmbedColor,"thumbnail":{"url":\"webhookEmbedThumbnail\"}}]})
                                                                                                                                                                                                      ^
SyntaxError: unexpected character after line continuation character

有人能帮忙吗?我对Python还不熟悉


Tags: urldatatitle错误descriptionpostrequestscolor
1条回答
网友
1楼 · 发布于 2024-06-09 10:29:12

由于你提供的信息有限,这是你能得到的最好答案

看起来你是从网上或者书上复制了这个功能。。。它们在不同的行中完成,比如:

r = requests.post(webhookLink, data={"embeds":[{"title":\
"webhookEmbedTitle\","description":\
"webhookEmbedDescription\","color":webhookEmbedColor,"thumbnail":{"url":\
"webhookEmbedThumbnail\"}}]})

您有两个选项,或者像这样将它们放在单独的行中,或者删除这个字符\

相关问题 更多 >