I am using the Hangouts Chat API to make a bot, but for some reason my formatted card is getting me a syntax error. This is the variable with the dictionary:
bot_message = {
"hangouts": {
"header": {
"title": article["title"],
"subtitle": article["author"],
"imageUrl": artile["urlToImage"]
},
{
"widgets" [{
"buttons": [{
"textButton": {
"text": "Open this article on " + article["source"]["name"],
"onClick": {
"openLink": {
"url": article["url"]
}
}
}
}]
}]
}
} # error occurs here
}
Basically, I get a syntax error saying the commented curly bracket is invalid syntax. Does anything not match up? There shouldn't be anything that doesn't match up, because VS Code (what I am using right now) automatically adds closing brackets. Does Python sometimes return random errors when the error is somewhere else (think as in Swift)?
Could someone point out the error?