They write a bot for telegrams, I wrote the function of sending a photo from a webcam, everything works, and there is one thing, the photo comes completely black, the light comes on the webcam, the photo comes, but completely black. What is the problem? Here is the code
from SimpleCV import Image, Camera elif command == '/snap': bot.sendChatAction(chat_id, 'typing') cam = Camera() img = cam.getImage() img.save('snap.jpg') bot.sendChatAction(chat_id, 'upload_photo') bot.sendDocument(chat_id, open('snap.jpg', 'rb')) os.remove('snap.jpg')