Octolaps - Fail to create timelaps

I'm getting this in my log.

2018-04-13 21:57:35,941 Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse/render.py", line 318, in _apply_pre_post_roll
shutil.copy(first_image_path, new_image_path)
File "/usr/lib/python2.7/shutil.py", line 120, in copy
copymode(src, dst)
File "/usr/lib/python2.7/shutil.py", line 91, in copymode
os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: '/home/pi/.octoprint/data/octolapse/tempsnapshots/190x190_152364848658/190x190000000.jpg'

2018-04-13 21:57:36,687 Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse/render.py", line 542, in _render
shutil.move(self._rendering_output_file_path, synchronization_path)
File "/usr/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/usr/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/usr/lib/python2.7/shutil.py", line 98, in copystat
os.utime(dst, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: '/home/pi/.octoprint/timelapse/190x190_20180413215735.mp4'

Hmm, try running this and give us the output.

ls -ld /home/pi/.octoprint/data/octolapse/ /home/pi/.octoprint/data/octolapse/tempsnapshots/

pi@octopi:/ ls -ld /home/pi/.octoprint/data/octolapse/ /home/pi/.octoprint/data/octolapse/tempsnapshots/ ls: cannot access /home/pi/.octoprint/data/octolapse/tempsnapshots/: No such file or directory drwxr-xr-x 4 pi pi 4096 Apr 15 18:22 /home/pi/.octoprint/data/octolapse/ pi@octopi:/

2018-04-13 21:28:52,119 Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse/render.py", line 542, in _render
shutil.move(self._rendering_output_file_path, synchronization_path)
File "/usr/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/usr/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/usr/lib/python2.7/shutil.py", line 98, in copystat
os.utime(dst, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: '/home/pi/.octoprint/timelapse/xyzCalibration_cube_20180413212850.mp4'

2018-04-13 21:57:35,941 Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse/render.py", line 318, in _apply_pre_post_roll
shutil.copy(first_image_path, new_image_path)
File "/usr/lib/python2.7/shutil.py", line 120, in copy
copymode(src, dst)
File "/usr/lib/python2.7/shutil.py", line 91, in copymode
os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: '/home/pi/.octoprint/data/octolapse/tempsnapshots/190x190_152364848658/190x190000000.jpg'

2018-04-13 21:57:36,687 Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse/render.py", line 542, in _render
shutil.move(self._rendering_output_file_path, synchronization_path)
File "/usr/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/usr/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/usr/lib/python2.7/shutil.py", line 98, in copystat
os.utime(dst, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: '/home/pi/.octoprint/timelapse/190x190_20180413215735.mp4'

Looks like the plugin deletes the /home/pi/.octoprint/data/octolapse/tempsnapshots/ folder after each print
The rendered comes out fine.

This looks to be a permission issue. Somehow Octolapse doesn't have permission to delete/move files. Maybe run an

ls -l

command to see what the permissions are for each of those folders?

It saves the generated file in the timelaps folder. What I have done is to mount a network drive to the timelaps folder. Don't want all timelaps files to fill up the sd card. Works just fine the built in timelaps function.

That could very well be the issue. Can you share with me how you were able to do that so I can try and maybe I can recreate the issue? Never mounted a drive to a folder location before, so it should be a good learning experience for me.

Hey, how interesting that I just saw this thread: https://discourse.octoprint.org/t/use-network-storage-for-timelapse/1324

I'll try that out and see if I can figure out what the problem is.

I haven't gotten the chance to work on setting it up just yet, but considering every linux box in my house is a debian base, I can't imagine I will run into any problems (short of a network outage mid-print)

Aha. Yep, network drive and permissions problems go together. Are you using samba, nfs, ?

1 Like

Using samba on the server (since i know how to get it working with webmin and it works relatively cleanly with windows, a few permissions on new files issues nonwithstanding from time to time) and then mount the network shares as cifs in my /etc/fstab, using a password file on the client to manage authentication

I'm using samba. I'll post my config.

I use this command in my fstab

//hostname/Multimedia/3dprinting/Timelapse /home/pi/.octoprint/timelapse cifs credentials=/home/pi/.smbcredentials,file_mode=0777,dir_mode=0777 0 0

I can save and create files from the command prompt and built in timelaps have no problem.
I tried to do the same with the temp folder of Octolaps but it started to write the temp files but after few screenshot it just stopped, at the end it said it could only take one snapshot.

1 Like