this work :
mybot.sendDocument(chat_id=chatid, document=open('bla.pdf', rb'))
But if I did before :
with open('bla.pdf', 'rb') as fp:
b = fp.read()
I can't do :
mybot.sendDocument(chat_id=chatid, document=b)
The error is :
TypeError: Object of type 'bytes' is not JSON serializable
I use python 3.5.2 win or linux
Thanks for answer