使用网络挂钩将本地图像发送到谷歌聊天室时面临问题。
attachment = open("images.jpg", "rb")
bot_message = {"cards": [{ "sections": [{"widgets": [{"image": attachment}]}]}]}
print (bot_message)
message_headers = {'Content-Type': 'application/json; charset=UTF-8'}
错误:
TypeError:BufferedReader 类型的对象不是 JSON 可序列化的