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

i got this error plx help #1

Closed
jayde007 opened this issue Apr 6, 2019 · 2 comments
Closed

i got this error plx help #1

jayde007 opened this issue Apr 6, 2019 · 2 comments

Comments

@jayde007
Copy link

jayde007 commented Apr 6, 2019

Traceback (most recent call last):
File "push.py", line 12, in
camera.start_recording('/home/pi/Documents/Video/' + datetime.datetime.now().strftime('%Y-%m-%d%H:%M:%S') +'.h264')
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 1049, in start_recording
encoder.start(output, options.get('motion_output'))
File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line 812, in start
super(PiVideoEncoder, self).start(output)
File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line 375, in start
self._open_output(output)
File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line 331, in _open_output
self.outputs[key] = mo.open_stream(output)
File "/usr/lib/python2.7/dist-packages/picamera/mmalobj.py", line 344, in open_stream
stream = io.open(stream, 'wb' if output else 'rb', buffering)
IOError: [Errno 2] No such file or directory: '/home/pi/Documents/Video/2019-04-0615:59:31.h264'

@mbaker92
Copy link
Owner

mbaker92 commented Apr 6, 2019

I just tried to replicate the error using a fresh Pi. I used my Raspberry Pi Zero W to test the code and found the problem.

You need to create a Video folder in your Documents directory for the code to work as is. You could also change the code by changing the camera.start_recording line to a directory that exists on your pi.

@mbaker92 mbaker92 closed this as completed Apr 6, 2019
@jayde007
Copy link
Author

jayde007 commented Apr 6, 2019

I got it tnx

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

No branches or pull requests

2 participants