Skip to content

error setting shutter with float #548

Open

Description

@samtygier

If I do

camera.shutter_speed = 200 * 1e3

I get the error

Traceback (most recent call last):
  File "./capture.py", line 30, in <module>
    cap()
  File "./capture.py", line 14, in cap
    camera.shutter_speed = 200 * 1e3
  File "/usr/lib/python3/dist-packages/picamera/camera.py", line 2594, in _set_shutter_speed
    self._camera.control.params[mmal.MMAL_PARAMETER_SHUTTER_SPEED] = value
  File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 1493, in __setitem__
    func(self._port, key, conv(value)),
ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong type

I suggest that either the conversion is automatic (PR to follow) or the error message be made a bit more friendly.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions