TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: DENNIS LEE BIEBER
date: 2018-06-16 11:41:00
subject: Re: ftp causing invalid s

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)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.