ctao707 2015-10-21 09:49 采纳率: 0%
浏览 4023

python VideoCapture使用时,报错

python 3.4.3
VideoCapture VideoCapture-0.9.5-cp34
Pillow 3.0

代码:
import os
from VideoCapture import Device
import time

SLEEP_TIME = 3
i = 0
cam = Device(devnum=0, showVideoWindow=0)
while i < 10:
cam_time = time.strftime('%Y%m%d%H%M%S', time.localtime(time.time()))
cam_name = 'camera' + cam_time + '.jpg'
cam.saveSnapshot(cam_name, 3, 1, 'bl')
os.remove(cam_name)
time.sleep(SLEEP_TIME)
i += 1

运行时,提示
File "D:\Python34\lib\site-packages\VideoCapture__init__.py", line 234, in saveSnapshot
self.getImage(timestamp, boldfont, textpos).save(filename, **keywords)
File "D:\Python34\lib\site-packages\VideoCapture__init__.py", line 154, in getImage
'RGB', (width, height), buffer, 'raw', 'BGR', 0, -1)
File "D:\Python34\lib\site-packages\PIL\Image.py", line 2053, in fromstring
"Please call frombytes() instead.")
Exception: fromstring() has been removed. Please call frombytes() instead.

请问有什么解决办法

  • 写回答

3条回答 默认 最新

  • wmwxto1 2015-12-29 12:24
    关注

    都没有人回复,,我也碰到这个问题了。感觉像库不兼容

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?