New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3: TypeError: 'dict_values' object does not support indexing in #80

pmermoz opened this Issue Mar 29, 2014 · 1 comment


None yet
2 participants

pmermoz commented Mar 29, 2014

With the following code:

import picamera
with picamera.PiCamera() as camera:
camera.resolution = (1280, 720)
stream = picamera.PiCameraCircularIO(camera, seconds=10)
camera.start_recording(stream, format='h264')

I get the error:
File "/usr/lib/python3/dist-packages/picamera/", line 1470, in _get_frame
return self._encoders.values()[0].frame
TypeError: 'dict_values' object does not support indexing

I use python3 on raspberry.
get the problem with the raspbian and github, report for github source.


in the file, replaced the line
return self._encoders.values()[0].frame
return list(self._encoders.values())[0].frame

Thanks for this API and outstanding documentation!


This comment has been minimized.


waveform80 commented Mar 29, 2014

Damn - you're absolutely right; I forgot to run the test suite against Python 3 last release, and Python 3 changes dict.values to be a generator. Sorry about that - I'll try and get a fix out this weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment