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

capture of a jpeg with resize and splitter port to a stream fails #344

Closed
dneunkirch opened this Issue Nov 1, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@dneunkirch

dneunkirch commented Nov 1, 2016

In my script for motion detection fails the capture method (https://github.com/dneunkirch/motiondetection/blob/testing/python/motion_detection.py#L176) not reproducible (invoked successful over 10000 times).

stream = io.BytesIO()
camera.capture(stream, format='jpeg', resize=(192, 108), splitter_port=3, use_video_port=True)
File "build/bdist.linux-armv6l/egg/picamera/camera.py", line 1383, in capture
     encoder.start(output)
File "build/bdist.linux-armv6l/egg/picamera/encoders.py", line 1024, in start
     super(PiCookedOneImageEncoder, self).start(output)
File "build/bdist.linux-armv6l/egg/picamera/encoders.py", line 395, in start
     self.parent._start_capture(self.camera_port)
File "build/bdist.linux-armv6l/egg/picamera/camera.py", line 503, in _start_capture
     len([e for e in self._encoders.values() if e.active]) == 1):
File "build/bdist.linux-armv6l/egg/picamera/encoders.py", line 376, in active
     return bool(self.output_port and self.output_port.enabled)

AttributeError: 'NoneType' object has no attribute 'enabled'

environment:

  • picamera version 1.12 (master)
  • camera board v1
  • on different raspberries:
  • 4.4.20-v7+ #908 SMP Wed Sep 7 14:44:27 BST 2016 armv7l GNU/Linux
  • 4.4.20+ #908 Wed Sep 7 14:35:04 BST 2016 armv6l GNU/Linux
  • 4.4.20-v7+ #909 SMP Tue Sep 13 16:59:08 BST 2016 armv7l GNU/Linux

I'm sorry that I don't have more informations.

Edit
I got just an other error (also thrown at the capture method):

File "build/bdist.linux-armv6l/egg/picamera/camera.py", line 1388, in capture
    'Timed out waiting for capture to end')

PiCameraRuntimeError: Timed out waiting for capture to end
@waveform80

This comment has been minimized.

Owner

waveform80 commented Nov 14, 2016

Hmm, that's a race condition (which is why it's showing up extremely rarely). I'll see what I can do about getting that fixed in 1.13

@waveform80 waveform80 added the bug label Nov 14, 2016

@waveform80 waveform80 added this to the 1.13 milestone Nov 14, 2016

@waveform80 waveform80 self-assigned this Nov 14, 2016

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