0

I am doing an OpenCV project and I cant seem to find a way to send the frames using telepot module to my telegram. I've already setup the telegram bot.


------------Opencv processing------
cv2.imshow('Object detector', frame)
bot.sendPhoto(238460030, (frame,'rb'))

I get this error:

AttributeError: 'str' object has no attribute 'read'

nathancy
  • 42,661
  • 14
  • 115
  • 137
Amirul Iqram
  • 313
  • 1
  • 3
  • 13

1 Answers1

0

If im not mistaken you need to take the photo first ,then you need to send the file with:

photo = ("img.jpeg",mode= 'rb')

Daniel shutov
  • 11
  • 1
  • 4