How do I send an image using file open with python an telepot?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 06:00:19

问题


I'm trying to send an image from my drive to telegram using the method sendPhoto but I can't. Which is the trick ?

I'm using Python 3.6.7 My code is as follows:

import sys
import telepot
import aiohttp
import asyncio
import os
import time 

bot = telepot.Bot('55615????:AA????)
bot.getMe()
id=32????
bot.sendPhoto(chatId, str(open("th-623777.jpg", os.O_RDONLY)) )

来源:https://stackoverflow.com/questions/53860243/how-do-i-send-an-image-using-file-open-with-python-an-telepot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!