python VideoCapture使用时,报错

问题描述

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:Python34libsite-packagesVideoCapture__init__.py", line 234, in saveSnapshot
self.getImage(timestamp, boldfont, textpos).save(filename, **keywords)
File "D:Python34libsite-packagesVideoCapture__init__.py", line 154, in getImage
'RGB', (width, height), buffer, 'raw', 'BGR', 0, -1)
File "D:Python34libsite-packagesPILImage.py", line 2053, in fromstring
"Please call frombytes() instead.")
Exception: fromstring() has been removed. Please call frombytes() instead.

请问有什么解决办法

解决方案

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

时间: 2024-08-04 12:41:07

python VideoCapture使用时,报错的相关文章

pyffmpeg安装-python安装pyffmpeg,cython报错

问题描述 python安装pyffmpeg,cython报错 问题是这样的,最近在装python版的ffmpeg模块pyffmpeg,执行python setup.py install后,报错如下: from Cython.Distutils import build_ext ,ImportError: No module named Cython.Distutils ,发现可能缺少Cython模块的安装,于是又执行了下面的命令: pip install cython 结果报错: buildin

python 中文插入mysql报错

问题描述 python 中文插入mysql报错 哪位大神帮忙看看这个是什么问题? python 中文插入mysql报错: content= [1165630L, '13940546367', 361L, None, Decimal('449.00'), Decimal('0.00'), 'xd5xd4xd4xa8xd5', 'xc1xc9xc4xfexcaxa1', 'xc9xf2xd1xf4xcaxd0', 'xbaxcdxc6xbdxc7xf8', 'xb6xfexbbxb7xd2xd4xc

linux下运行python导入包cx_oracle报错ELFCLASS32

问题描述 linux下运行python导入包cx_oracle报错ELFCLASS32 linux运行python导入oracle包报错ELFCLASS32,linux平台是64bit,python也是64bitcx_Oracle网上下载应该不区分多少位吧?问题:这个报错是如何解决?请用linux和python的大神进 解决方案 你要看下 cx_oracle 是不是支持2.6.6版本,有可能不支持. 解决方案二: 参考:http://www.educity.cn/wenda/288024.htm

爬虫-python 2.7.6报错SyntaxError: invalid syntax

问题描述 python 2.7.6报错SyntaxError: invalid syntax 在学习爬虫的时候遇到了点问题: 'User-Agent':'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36' 这一行老是报错SyntaxError: invalid syntax hea

Python MySQLdb 导入libmysqlclient报错

摘要 flask开发相关功能,在本地测试没有问题,但是放到线上环境却报错 ImportError: libmysqlclient.so.16: cannot open shared object file: No such file or directory 检查了下发现在 /usr/lib64/mysql 下面存在libmysqlclient.so.18文件(uanme -a 确认是64位系统) 解决过程 发现问题,不是自己遇到的也没有解决办法,那就网上查呗,发现大家的思路: copy /us

Ubuntu中安装Python程序后系统报错的解决方法

Python是一种面向对象.直译式计算机程序设计语言,也是一种http://www.aliyun.com/zixun/aggregation/17547.html">功能强大而完善的通用型语言,已经具有十多年的发展历史,成熟且稳定.这种语言具有非常简捷而清晰的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中运行.目前,基于这种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多. 虽然Python可能被粗略地分类为"脚本语言"(script lan

Python easy_install使用时提示 Entry point (‘console_scripts’, ‘easy_install’) not found

在一些Linux机器上用easy_install安装MySQLdb时,遇到的问题,使用web.py做几个RESTful API和几个网页,与MySQL交互是需要用MySQLdb这个Python库,当使用"sudo easy_install MySQL-python"命令安装MySQLdb时,提示" Please install a more recent version first, using 'easy_install -U distribute'.",我就执行

Python报错UnicodeDecodeError: ascii codec can t decode byte 0xe0 ...解决方法

Windows 8机器上安装Python2.7后,下载一些Package包进行setup时总是报错UnicodeDecodeError,如下: File "C:/Python27/lib/mimetypes.py", line 250, in enum_types ctype = ctype.encode(default_encoding) # omit in 3.x! UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 i

python-Python程序中一个报错的疑问

问题描述 Python程序中一个报错的疑问 现在的问题是一个和硬件连接的程序 在运行到11分钟的时候会报处以下的错误 Unhandled exception in thread started by> 请问大家是什么原因啊 解决方案 多加调试信息.代码中有异常