On 05/06/18 11:08, RobH wrote:
> On 04/06/18 20:22, Ahem A Rivet's Shot wrote:
>> On Mon, 4 Jun 2018 18:48:16 +0100 RobH wrote:
>>
>>> IOError: [Errno 2] No such file or directory:
>>> '//192.168.0.22/CCTV/PiZero/2018-06-04_17.47.17.h264'
>>
>> That bit in the script should read /mnt/CCTV/PiZero.
>
> The fstab file didn't seem to have the correct information into and
> consequently the PiZero failed to boot up. I then had to re flash the
> sd card.
>
> Now I have successfully mounted the /mnt/CCTV/Pizero as it shows up
> here:
>
> pi@raspberrypi:~ $ df -h Filesystem Size Used
> Avail Use% Mounted on Other information edited out /dev/sda1
> 7.5G 16K 7.5G 1% /media/pi/B00F-4173 //192.168.0.22/CCTV/PiZero/
> 899G 3.5G 896G 1% /mnt/CCTV/PiZero pi@raspberrypi:~ $
>
>
> Now the sensor has stopped working for some unknown reason, maybe a
> capacitor has been bent over to much whilst I was fiddling with the
> PiZero connections.
>
As previously, I have again successfully mounted the /mnt/CCTV/PiZero
directory, and the sensor and the new camera are working just fine.
pi@raspberrypi:~/Downloads $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 4.1G 9.9G 30% /
/dev/mmcblk0p1 42M 21M 21M 51% /boot
tmpfs 38M 4.0K 38M 1% /run/user/1000
//192.168.0.22/CCTV/PiZero/ 899G 2.7G 897G 1% /mnt/CCTV/PiZero
pi@raspberrypi:~/Downloads $
When I run pi@raspberrypi:~/Downloads $ python intruder.py,
it returns this:
Traceback (most recent call last):
File "intruder.py", line 37, in
shutil.copyfile(RAMname, NASname)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory:
'//192.168.0.22/mnt/CCTV/PiZero/2018-06-13_19.52.59.h264'
Relevant portion of code where it falls over, as above
#create base filename at time of motion trigger
fname = time.strftime("%Y-%m-%d_%H.%M.%S.h264",
time.localtime(triggerTime))
RAMname = os.path.join("/run/shm", fname)
NASname = os.path.join("//192.168.0.22/mnt/CCTV/PiZero" , fname)
camera.start_preview()
#capture video to RAM device first
camera.start_recording(RAMname)
camera.wait_recording(10)
camera.stop_recording()
camera.stop_preview()
#copy from RAM device to NAS device
shutil.copyfile(RAMname, NASname)
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|