On Sat, 16 Jun 2018 15:23:25 +0100, RobH declaimed the
following:
>>
>> No the script didn't run very long, as it produced this error which I
>> now recall from last night.
>>
>> pi@raspberrypi:~/Downloads $ python intruder.py
>> Traceback (most recent call last):
>> File "intruder.py", line 36, in
>> camera.start_recording(NASname)
>> 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 13] Permission denied:
>> '/mnt/CCTV/PiZero/2018-06-16_15.03.02.h264'
>>
>Adendum:
>
>The script as it is now runs for about 10 seconds and falls down with a
>permission error.
>It also produces 0 byte files on the NAS box, but no files on the PiZero
>now.
>
Which is the same permission error that the shutil.copyfile() was
producing. This tells me that there is nothing wrong with the script
itself. The problem appears to be on the NAS side -- since it IS accepting
operations that provide a file name, but then refuses to accept the actual
file data.
Restore the script to the version using RAMname for the capture, and
with the .copyfile() back in place. When it dies do the following and
cut&paste the results into a message:
ls -l /run/shm
cp /run/shm/*.h264 /mnt/CCTV/PiZero
rm -f /run/shm/*.h264
{Note: the last line is going to clean out old files from /run/shm -- cp &
rm together produce the effect of
mv -f /run/shm/*.h264 /mnt/CCTV/PiZero
}
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|