I followed their brief tutorial on downloading an image but I'm encountering an exception:
telegram.photosize.PhotoSize object at ... is not JSON serializable
the function for catching the images looks like this:
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)
At this point I have no idea what I'm doing wrong and can't find any solution on the net.