On 17/05/18 23:20, Dennis Lee Bieber wrote:
> On Thu, 17 May 2018 19:57:50 +0100, RobH declaimed the
> following:
>
>
>> This is my NAS box folders:
>>
>> [root@freenas ~]# ls -la /mnt
>
> You are logged into the NAS... That is not the machine you need to do
> the mount on.
>
>>
>> total 172
>>
>> drwxr-xr-x 5 root wheel 256 Apr 17 12:19 .
>>
>> drwxr-xr-x 19 root wheel 26 Apr 17 12:19 ..
>>
>> drwxrwxr-x+ 4 root nobody 5 May 1 2017 Backup_Data
>>
>> drwxrwxr-x+ 5 root nobody 13 May 8 12:02 CCTV
>>
>> drwxrwxr-x+ 9 root nobody 39 Jan 14 09:45 WinShareAfter I created the
the said folders ie /mnt/CCTV/PiZero I then ran the python script for the
sensor detection and camera , and it returned :
Traceback (most recent call last)
File "intruder_recmotion.py", line 37, in
shutil.copyfile(RAMname, NASname)
File "/usr/lib/python 2.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-16-16_11.25.36.h264'
I have checked the path to the PiZero folder or dataset on my FreeNAS
box and it is correct.
>>
>> -rw-r--r-- 1 root wheel 5 Aug 13 2017 md_size
>>
>> As you can see CCTV is already mounted and showing. PiZero is a sub
>> dataset of CCTV on my NAS box
>
> CCTV is a LOCAL DIRECTORY ON THE NAS...
>
> You have to create a directory on the RPI which you use "mount" on in
> order to link the NAS directory onto the RPI directory (the names do not
> have to be the same).
>
>
I am not doing the mount on my NAS box, only on the Pi Zero.
And I am not sure if you saw my reply to you after you supplied the new
python code for me to use, but I am getting this when I run the said script.
After I created the the said folders on the Pi Zero ie /mnt/CCTV/PiZero
I then ran the python script for the sensor detection and camera , and
it returned :
Traceback (most recent call last)
File "intruder_recmotion.py", line 37, in
shutil.copyfile(RAMname, NASname)
File "/usr/lib/python 2.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-16-16_11.25.36.h264'
I have checked the path to the PiZero folder or dataset on my FreeNAS
box and it is correct.
On gogling this error, I came across this:
https://stackoverflow.com/questions/9765227/ioerror-errno-2-no-such-file-or-dir
ectory-trying-to-open-a-file
Here one of the replies says to the OP says:
You're not storing the result of join. This should be something like:
for f in os.listdir(src_dir):
f = os.path.join(src_dir, f)
For me, as I am only a newbie wit both Linux and more so python, I am
not sure where I would actually include a similar statement or line of
code in the python code you did for me.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|