【发布时间】:2021-03-17 08:33:44
【问题描述】:
我正在循环运行一些 Python 脚本(但不是那么快)。
示例:
import time
import cv2
stream = cv2.VideoCapture(0)
while True:
ret,frame = stream.read()
cv2.imshow("Frame",frame)
cv2.waitKey(1)
time.sleep(10)
执行几分钟后,我收到此错误:
E1205 11:19:12.803174714 32302 backup_poller.cc:132] Run client channel backup poller: {"created":"@1607177952.802346313","description":"pollset_work","file":"src/core/lib/iomgr/ev_epollex_linux.cc","file_line":324,"referenced_errors":[{"created":"@1607177952.802226759","description":"Bad file descriptor","errno":9,"file":"src/core/lib/iomgr/ev_epollex_linux.cc","file_line":954,"os_error":"Bad file descriptor","syscall":"epoll_wait"}]}
有人知道这是什么吗?我查看了 Google,但没有找到任何好的解决方案。
【问题讨论】:
-
代码对我来说很好用。也许您应该将
time.sleep(10)减少到time.sleep(1)并重试。