After getting help from people in this group, my python intruder program was working just great at first.
Then a few days later , when I ran the python script, it returned:
IOError: [Errno 28] No space left on device.
I then ran
pi@raspberrypi:/mnt/CCTV/PiZero $ df -Bm Filesystem 1M-blocks Used Available Use% Mounted on /dev/root 14850M 3434M 10752M 25% / devtmpfs 182M 0M 182M 0% /dev tmpfs 186M 186M 0M 100% /dev/shm
Didn't find your answer? Ask the community — no account required.
D
Dennis Lee Bieber
On Tue, 10 Jul 2018 08:53:04 +0100, RobH declaimed the following:
Did you examine the time stamps on those files? I'm just curious if they are all recent, or scattered around. Note that rebooting the RPi should result in cleaning out those files too -- should they have been left-overs from development.
And did you examine the NAS to see if copies of those files were on it BEFORE doing the copy?
If the script is configured as I designed it, it is:
1) capturing to the RAM
2) a few seconds after the capture completes it does a copyfile() to move the captured data to the NAS
3) then does an unlink() of the RAM file, which is supposed to delete it from RAM
If the script is moving files to the NAS, but not deleting them, I'd suspect a problem with the call to unlink(). It is either commented-out (since such was done at one time in the debugging), is somehow not referencing the correct file, or is failing for some reason. If the script is not moving files to the NAS, I'd suspect both the copyfile() and unlink() are commented out.
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
R
RobH
If that be the case, I don't know why I was getting the said error message.
The timestamps of the files are 2018-06-24 upto 2018-06-27, and one
2018-07-09_22.37.29
Yes I did examine the PiZero folder before copying the files across to it, and there were no files copied or written while the python script was running
The os.unlink line was commented out as I had forgotten to un comment it before. The script is running now and files are being sent to my NAS drive.
Now here is an interesting thing:
I have just done: rob@rob-Z97:~$ cd /mnt/CCTV/PiZero bash: cd: /mnt/CCTV/PiZero: No such file or directory
So then: rob@rob-Z97:~$ cd /mnt rob@rob-Z97:/mnt$ ls WinShare
WinShare is a dataset or folder on my NAS drive
I wonder what happened to the mounted PIZero folder, or am I offtrack.
>
D
Dennis Lee Bieber
On Tue, 10 Jul 2018 17:56:21 +0100, RobH declaimed the following:
Possibly some bug in the error message list -- wherein it assumes all storage is SD card.
If files are being generated in RAM, and not being copied to NAS, I'd expect the copyfile() call to be acting up.
And that would be why the RAM space filled up...
Well, that prompt string tells me you are not logged into the RPi...
... so I wouldn't expect mount points on the RPi to be visible.
You're completely on the wrong /machine/
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
R
RobH
I am logged in to the RPi.. by ssh if that counts.
Yea, maybe. Perhaps I should connect a monitor up to the PiZero to see if the actual CCTV/PiZero folders are still there. But to be honest , I'm not that too concerned as long as the python script is doings it's job.
B
Björn Lundin
IOError: [Errno 28] No space left on device. That is nothing wrong with that message. Your ram-drive is full - ie no space left.
it _really_ look like your on a machine calleed rob-Z97 as user rob. NOT as user pi at an rpi. I think you called thar something else. Can it be that you _are_ on rob-Z97 and tried to ssh to the pi, and the ssh login failed. and you thought it succeeded, thus carrying on with commands? Has happened to many people...
--
R
RobH
Yes I am on a machine called rob-Z97 as user rob. And from that machine:
rob@rob-Z97:~$ ssh pi@192.168.0.27 pi@192.168.0.27's password: Linux raspberrypi 4.9.41+ #1023 Tue Aug 8 15:47:12 BST 2017 armv6l
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Jun 29 12:12:39 2018 from 192.168.0.15
SSH is enabled and the default password for the 'pi' user has not been changed. This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
pi@raspberrypi:~ $ cd Downloads pi@raspberrypi:~/Downloads $ ls intruder.py
As far as I am aware, the login did not fail because I am running the python script from the machine called rob-Z97 by SSH
M
mm0fmf
Oh good, this thread is back.... I'll fetch my popcorn! :-)
M
mm0fmf
You are wrong. The main problem is failure to read what is on the screen followed by jumping to the wrong conclusion.
For example, this thread title includes "no space on sdcard" yet the error message was "no space left on device". The df (disk free) command shows there is 10725MB free. So why did you decide the sdcard was full when the command you ran showed 10G free?
Read the message. Stop. Read it again. Then check you read it correctly.
B
Björn Lundin
You do notice the different prompt here? user@machine ....
you did write Now here is an interesting thing:
I have just done: rob@rob-Z97:~$ cd /mnt/CCTV/PiZero bash: cd: /mnt/CCTV/PiZero: No such file or directory
and I think Dennis tried to tell you that you are on the wrong machine.
Can you see that you tried to cd to /mnt/CCTV/PiZero on machine rob-Z97 and not on the pi?
Then the prompt would look like pi@raspberrypi. You showed us rob@rob-Z97
--
R
RobH
Ok I assumed wrongly then that the device was the sdcard. I thought that because of the error message, to follow, an no files written to my NAS Pizero folder were copied or written.
pi@raspberrypi:~/Downloads $ python intruder.py Traceback (most recent call last): File "intruder.py", line 35, in camera.wait_recording(10) File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line
1167, in wait_recording encoder.wait(timeout) File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line
395, in wait self.stop() File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line
815, in stop super(PiVideoEncoder, self).stop() File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line
419, in stop self._close_output() File "/usr/lib/python2.7/dist-packages/picamera/encoders.py", line
349, in _close_output mo.close_stream(output, opened) File "/usr/lib/python2.7/dist-packages/picamera/mmalobj.py", line
368, in close_stream stream.close() IOError: [Errno 28] No space left on device
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.