Skip to content
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

[raspimjpeg.py] TypeError raised on startup #11

Closed
pschmitt opened this issue Mar 9, 2017 · 2 comments
Closed

[raspimjpeg.py] TypeError raised on startup #11

pschmitt opened this issue Mar 9, 2017 · 2 comments
Labels

Comments

@pschmitt
Copy link

pschmitt commented Mar 9, 2017

Hi,

when launching raspimjpeg.py a TypeError is raised on my Raspberry Pi 2 Model B.
This may be a picamera issue.

Info

OS: archlinuxarm
Python version: 3.6.0
picamera version: 1.10 (Tested with 1.13 as well, the issue persists)

Trace

INFO:root:raspimjpeg.py 0.8
INFO:root:hello!
DEBUG:root:initializing camera
DEBUG:root:using resolution 800x600
DEBUG:root:using framerate = 10
DEBUG:root:using vflip = false
DEBUG:root:using hflip = false
DEBUG:root:using rotation = 0
DEBUG:root:using brightness = 50
DEBUG:root:using contrast = 0
DEBUG:root:using saturation = 0
DEBUG:root:using sharpness = 0
DEBUG:root:using exposure compensation = 0
DEBUG:root:using video stabilization = false
DEBUG:root:using denoise = false
DEBUG:root:using image effect = none
DEBUG:root:camera initialized
DEBUG:root:starting capture
Traceback (most recent call last):
  File "raspimjpeg.py", line 327, in <module>
    run()
  File "raspimjpeg.py", line 314, in run
    use_video_port=not options.stills, thumbnail=None, quality=options.quality)
  File "/usr/lib/python3.6/site-packages/picamera/camera.py", line 1680, in capture_sequence
    if not encoder.wait(self.CAPTURE_TIMEOUT):
  File "/usr/lib/python3.6/site-packages/picamera/encoders.py", line 853, in wait
    raise self.exception
  File "/usr/lib/python3.6/site-packages/picamera/encoders.py", line 693, in _callback
    stop = self._callback_write(buf)
  File "/usr/lib/python3.6/site-packages/picamera/encoders.py", line 1443, in _callback_write
    super(PiOneImageEncoder, self)._callback_write(buf, key)
  File "/usr/lib/python3.6/site-packages/picamera/encoders.py", line 731, in _callback_write
    ct.string_at(buf[0].data, buf[0].length))
TypeError: write() argument must be str, not bytes

@ccrisan
Copy link
Owner

ccrisan commented Mar 9, 2017

I only tested raspimjpeg.py on python2. For now there are no plans to port it to python3. Pull requests are welcomed though :)

@ccrisan ccrisan closed this as completed Mar 9, 2017
@ccrisan ccrisan added the wontfix label Mar 9, 2017
@pschmitt
Copy link
Author

pschmitt commented Mar 9, 2017

Yeah that's definitely a Python 3 issue. With Python 2.7 it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants