v4l2 throws a TypeError when imported in Python 3.5
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-v4l2 |
New
|
Undecided
|
Unassigned |
Bug Description
When importing v4l2, I get:
openstack@
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/
) = range(1, 9) + [0x80]
TypeError: unsupported operand type(s) for +: 'range' and 'list'
And the relevant lines in /usr/local/
openstack@
v4l2_buf_type = enum
(
V4L2_
V4L2_
V4L2_
V4L2_
V4L2_
V4L2_
V4L2_
V4L2_
V4L2_
) = range(1, 9) + [0x80]
-------
Notes:
1. vl42 was installed using:
openstack@
Requirement already up-to-date: v4l2 in /usr/local/
2. I use Python3.5 on Ubuntu 16.04
Related branches
- python-v4l2 developers: Pending requested
-
Diff: 21 lines (+2/-2)1 file modifiedv4l2.py (+2/-2)
If I change the following two lines:
openstack@ prclnx04: ~/python/ v4l2$ grep -n "i in range" "/usr/local/ lib/python3. 5/dist- packages/ v4l2.py" | grep range
197:) = [i+0x80 for i in range(1, 10)]
249:) = [i+2 for i in range(0, 5)]
The import is successful.