Open apriscatole opened 6 years ago
This is super-late but i think there is a problem with your script "picamera.sh" Seeing your output, the third time it seems that it wants to put the files in the same folder as the 2nd time, so dropboxuploader is just telling you that the files already exist. Maybe you could post picamera.sh to see what it does if you didn't solve this yet.
Hi, thanks for the reply:
/usr/bin/python2.7 /home/pi/picamera/camera.py
and
import time import datetime import picamera
t = datetime.datetime.now().strftime("%Y.%m.%d %H.%M.%S") camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1024,768)
camera.start_preview() name = "/home/pi/picamera/images/"+t+'.jpg' camera.capture(name)
/home/pi/stazione/code/Dropbox-Uploader/./dropbox_uploader.sh -f /home/pi/picamera/images/ delete camera /home/pi/stazione/code/Dropbox-Uploader/./dropbox_uploader.sh -f /home/pi/stazione/dropbox/dropbox_uploader upload /home/pi/picamera/images/ camera
I don't get what are you trying to achieve...
-f option is for loading different configuration files, what are you trying to do with this command:
/home/pi/stazione/code/Dropbox-Uploader/./dropbox_uploader.sh -f /home/pi/picamera/images/ delete camera
Obviously "-f /home/pi/picamera/images/" that folder is not a configuration file. Maybe you wanted this:
/home/pi/stazione/code/Dropbox-Uploader/./dropbox_uploader.sh -f /home/pi/stazione/dropbox/dropbox_uploader delete camera
But if you are only using dropbox uploader with 1 configuration file you dont need the -f option.
And it seems that you first try to delete the camera folder from your dropbox and then upload it again? How is that recursive? Also in your first post your images didnt have the date in the name.
I guess you modified the script since the first time you posted.
Could you say what you want the script to do and what is it really doing right now?
I use dropbox uploader to upload photo taken with my raspberry camera...the first time that I run the script the folder is created correctly. The second time another folder is create with the same name. The third time is ok.
pi@dvmeteo-pi:~/picamera $ /bin/bash /home/pi/dropbox/picamera.sh
first time, it's ok
pi@dvmeteo-pi:~/picamera $ /bin/bash /home/pi/dropbox/picamera.sh
the dropbox path is picamera/picamera and the script uploads again the file
pi@dvmeteo-pi:~/picamera $ /bin/bash /home/pi/dropbox/picamera.sh
3° time, no uploads
probabily I run the script in a wrong way....