Octolapse - Camera Script Failed

Created on 16 Jun 2020  路  18Comments  路  Source: FormerLurker/Octolapse

If this is a feature request describe it here

Just wanted to say thanks for the help in advance !

Version of Octolapse


Octolapse Version: Octolapse 0.4.0

Version of OctoPrint

OctoPrint Version: OctoPrint 1.4.0 running on OctoPi 0.17.0

When you ran into the problem, did you have diagnostic logging enabled?

Diagnostic Logging was Enabled: YES

What were you doing when the problem occurred

  1. After getting good results with the octolapse plugin with a webcam, I decided to test out my DSLR. I watched your youtube video tutorial exactly.
  2. I set up a new profile for the DSLR in octolapse. Selected "external camera - script for "camera type" and I entered the script itself - "/home/pi/scripts/take-snapshot.sh". Then I went to test the script and I received this error -
    image

Below is a image of my octolapse settings:

image

  1. Enabled "test mode" and selected "debug" under logging. Started my print and I received two failed snapshots and I decided to report my logs.

What should have happened?

I believe the DSLR should have taken snapshots of the print successfully. It is a cannon EOS 700D which is supported to my knowledge and It was recognized by this command "gphoto2 --auto-detect" It also actuated and took a picture when given the command - "gphoto2 --capture-image"

What happened instead?

Octolapse gave me an error "2 failed snapshots"

Operating System running OctoPrint and Octolapse

OS Name: Octopi - running on raspberry-pi
Os Version: OctoPi 0.17.0

Printer model & used firmware incl. version

Printer Model: Creality Ender 3 Pro
Printer Firmware Version: Just bought it brand new a month ago - not entirely sure

Browser and version of browser, operating system running browser

Browser: Chrome
Browser OS: ___REPLACE_THIS__BROWSER_OS_GOES_HERE

Link to the gcode file you were printing when the problem occurred

Link to Gcode File: https://www.dropbox.com/s/js2w7iv6b5vimrh/CE3PRO_7-8_Bearing_ID_Test.gcode?dl=0

Link to settings.json

Link to settings.json with all passwords removed: https://www.dropbox.com/s/dh299hjjuefh8wt/settings.json?dl=0

Link to plugin_octolapse.log

Link to plugin_octolapse.log: https://www.dropbox.com/s/thcwnpn0gjn3suj/plugin_octolapse%20%281%29.log?dl=0

Link to octoprint.log

Link to octoprint.log: https://www.dropbox.com/s/7wzpl83ryzwwkmf/octoprint.log?dl=0

Link to contents of Javascript console in the browser

Link to javascript console output: image

Screenshots and/or videos of the problem:

Screenshot/Video Links: https://www.dropbox.com/s/wcoyvcgzrpxt0r3/Octolapse_screenshot.PNG?dl=0

All 18 comments

I found this in the octolapse log:

2020-06-16 03:18:36,924 - octolapse.script - DEBUG - Executing DSLR - Snapshot Camera Script: "/home/pi/scripts/take-snapshot.sh" "0" "0" "/tmp/tmpHYBR4z" "/tmp/tmpHYBR4z/0deb4c61-a26e-47af-a6f2-0a70c5c5c9f2/f840c2c7-2c9d-4d18-acbc-db96f8c3c75e" "test_snapshot000000.jpg" "/tmp/tmpHYBR4z/0deb4c61-a26e-47af-a6f2-0a70c5c5c9f2/f840c2c7-2c9d-4d18-acbc-db96f8c3c75e/test_snapshot000000.jpg" "DSLR"
2020-06-16 03:18:37,104 - octolapse.script - DEBUG - Console output (stdout) for 'DSLR - Snapshot Camera Script':Creating directory: /tmp/tmpHYBR4z/0deb4c61-a26e-47af-a6f2-0a70c5c5c9f2/f840c2c7-2c9d-4d18-acbc-db96f8c3c75e
2020-06-16 03:18:37,106 - octolapse.script - ERROR - Error output (stderr) for 'DSLR - Snapshot Camera Script':
    sudo: no tty present and no askpass program specified
    The snapshot was not found in the expected directory: '/tmp/tmpHYBR4z/0deb4c61-a26e-47af-a6f2-0a70c5c5c9f2/f840c2c7-2c9d-4d18-acbc-db96f8c3c75e/test_snapshot000000.jpg'.

Looks like your sudoers file has not been configured correctly. Most likely, the path to gphoto2 is incorrect. Reread this guide, and pay extra close attention to the bit that talks about using this command: whereis gphoto2

I will probably move that section to make it more clear, but my guess is that your instance of gphoto2 is NOT at the location in the script example. Let me know if that's the case.

I used the command: "whereis gphoto2" it returned the following:
image

Can you post the contents of your sudoers file?

I believe this is what you are looking for hopefully -
image

I dont see the line in there for gphoto2. Please review the guide I linked to above and add the necessary line at the end. Be sure your directory matches the whois directory for gphoto2: /usr/bin/gphoto2

Thanks again for the help, its very much appreciated dude.

I added the necessary line -
image

I used the command - "whereis gphoto2" it returned this -
image

I'm still receiving errors connecting when I test the external camera script -
image

Did you reboot after modifying sudoers? If not, do that now. If it still doesn't work, edit your debug profile, click clear log, retest the camera, and post the resulting log file.

Correction-> when i said debug profile I meant logging profile.

Also, a full reboot of the pi is required, not just restarting octoprint.. sorry about sending my half thoughts. Work has been busy and I am rushing things.

Any update here?

Hey,

thanks again for all your help I havent gotten back due to project overload at work, I got it working late last night! it was user error

I have the same problem.
Everything works perfect up to here:

New file is in location /capt0000.jpg on the camera
Saving file as /home/pi/scripts/test.jpg
Deleting file /capt0000.jpg on the camera
If you enter ls, you should see test.jpg in the current directory. You can delete the test image by entering rm test.jpg.

When I give test script it does the same to me

Excellent tutorial. I thank you!
I only need the last step; (

friend you have a mistake here
https://github.com/FormerLurker/Octolapse/wiki/V0.4---GPhoto2-Installation

the / local / is missing

@Naver32, local is missing from where? Can you take a screenshot and mark where it shout be?

@Naver32, local is missing from where? Can you take a screenshot and mark where it shout be?

Hey guys, I was running into an issue where my External Camera Setup - Script was getting an error. I followed the instructions to the letter for both the Gphoto2 and Former Lurker Tutorials (great job by the way).

I noticed an issue with the Gphoto2 installation wiki that was missing a local in the 'Step 3 - Configure /etc/sudoers file' section.
https://github.com/FormerLurker/Octolapse/wiki/V0.4---GPhoto2-Installation#step-3---configure-etcsudoers-file

Scroll down to where it says "add the following lines to the VERY END of the file:"
Inspect the string for the directory. It is missing one critical part /local/

This is what they say to post;

allow 'sudo gphoto2' to run without supplying a password

pi ALL = (root) NOPASSWD: /usr/bin/gphoto2

This is what I corrected my sudoers file to look like;

allow 'sudo gphoto2' to run without supplying a password

pi ALL = (root) NOPASSWD: /usr/local/bin/gphoto2

This solved my issue and Octolapse camera profile is now successfully sending the External Camera Script.

This is the first time I have ever posted on Github so pelase excuse my bad methods of sharing informaiton.

Thanks again for being such an awesome dude Former Lurker. You seriously are a godsend with all this stuff.

Cheers!

-Shawn

Hi shawn, thanks! I guess I need to add a step that prints the location of gphoto2 (the setup is geared more towards octopi users). I added that in another step, but it looks like I missed it there. Nice catch, thanks, and enjoy! Happy Halloween (if you are into that kind if thing)!

Thanks! I'm a newbie to all of this and surprisingly it is all going well. Entirely thanks to your wonderful work. Seriously man couldn't do this without you and it is such a fun aspect of this whole 3d printing process.

Thanks man! Happy Halloween to you as well. Halloween is my favorite Holiday.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yoyo42 picture yoyo42  路  4Comments

bradcozine picture bradcozine  路  10Comments

Tjololo12 picture Tjololo12  路  9Comments

brandonforty2 picture brandonforty2  路  9Comments

MetalTurtle18 picture MetalTurtle18  路  4Comments