1
이미지 파이썬 전보의 API하지만 나는 예외가 발생 해요 :다운로드 내가 이미지를 다운로드에 대한 자신의 간단한 튜토리얼을 따라
telegram.photosize.PhotoSize object at ... is not JSON serializable
이미지를 잡기위한 기능은 다음과 같습니다 :
def photo(bot, update):
file_id = update.message.photo[-1]
newFile = bot.getFile(file_id)
newFile.download('test.jpg')
bot.sendMessage(chat_id=update.message.chat_id, text="download succesfull")
photo_handler = MessageHandler(Filters.photo, photo)
dispatcher.add_handler(photo_handler)
에서 이 시점에서 내가 뭘 잘못하고 인터넷에 대한 해결책을 찾을 수 없는지 전혀 모른다.
가에서 참조하시기 바랍니다 (http://stackoverflow.com/help/self-answer) 이틀 후에 돌아와 답을 확인하십시오. 그러나 다른 사용자를 위해 몇 가지 정보를 추가하십시오. –