FormerLurker / Octolapse

Stabilized timelapses for Octoprint
GNU Affero General Public License v3.0
638 stars 99 forks source link

Camera Script Test Failed #869

Closed TerrorInc closed 2 years ago

TerrorInc commented 2 years ago

Unable to perform the test, or an unexpected error occurred. Please check the log file for details. Status: error. Error: INTERNAL SERVER ERROR

When I go into my octolapse log, this is the error

2022-10-17 03:32:07,909 - octolapse.script - ERROR - The 'DSLR - Snapshot Camera Script' process has timed out before completing. Attempting to kill the process.

2022-10-17 03:32:07,947 - octolapse.script - ERROR - An error occurred while killing the 'DSLR - Snapshot Camera Script' process. Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/psutil/init.py", line 1176, in _send_signal os.kill(self.pid, sig) PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/script.py", line 103, in kill proc.kill() File "/home/pi/oprint/lib/python3.7/site-packages/psutil/init.py", line 272, in wrapper return fun(self, *args, **kwargs) File "/home/pi/oprint/lib/python3.7/site-packages/psutil/init.py", line 1239, in kill self._send_signal(signal.SIGKILL) File "/home/pi/oprint/lib/python3.7/site-packages/psutil/init.py", line 1186, in _send_signal raise AccessDenied(self.pid, self._name) psutil.AccessDenied: psutil.AccessDenied (pid=2528) 2022-10-17 03:32:19,906 - octolapse.init - ERROR - An unexpected error occurred while executing the snapshot script. Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/psutil/init.py", line 1176, in _send_signal os.kill(self.pid, sig) PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/script.py", line 103, in kill proc.kill() File "/home/pi/oprint/lib/python3.7/site-packages/psutil/init.py", line 272, in wrapper return fun(self, *args, **kwargs) File "/home/pi/oprint/lib/python3.7/site-packages/psutil/init.py", line 1239, in kill self._send_signal(signal.SIGKILL) File "/home/pi/oprint/lib/python3.7/site-packages/psutil/init.py", line 1186, in _send_signal raise AccessDenied(self.pid, self._name) psutil.AccessDenied: psutil.AccessDenied (pid=2528)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/script.py", line 109, in kill self._kill_exceptions.append(e) AttributeError: 'NoneType' object has no attribute 'append'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/init.py", line 1395, in test_camera_script_request success, errors, snapshot_created = camera.CameraControl.test_script(camera_profile, script_type, self._basefolder) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/camera.py", line 645, in test_script success, error, snapshot_created = CameraControl._test_camera_snapshot_script(camera_profile, script_type, base_folder) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/camera.py", line 694, in _test_camera_snapshot_script cmd.run() File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/script.py", line 685, in run return super(CameraScriptSnapshot, self).run(self.get_args(), self.timeout_seconds) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/script.py", line 218, in run self._run(args, timeout_seconds=timeout_seconds) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/script.py", line 281, in _run self.kill() File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/script.py", line 120, in kill self.read_output_from_proc() File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_octolapse/script.py", line 156, in read_output_from_proc (exc_stdout, exc_stderr) = self.proc.communicate() File "/usr/lib/python3.7/subprocess.py", line 939, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "/usr/lib/python3.7/subprocess.py", line 1701, in _communicate data = os.read(key.fd, 32768) OSError: [Errno 9] Bad file descriptor

My Whereis gphoto2 returns this gphoto2: /usr/bin/gphoto2 /usr/share/man/man1/gphoto2.1.gz

my sudo visudo returns this #

This file MUST be edited with the 'visudo' command as root.

#

Please consider adding local content in /etc/sudoers.d/ instead of

directly modifying this file.

#

See the man page for details on how to write a sudoers file.

# Defaults env_reset Defaults mail_badpass Defaults secure_path="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Host alias specification

User alias specification

Cmnd alias specification

User privilege specification

root ALL=(ALL:ALL) ALL

Allow members of group sudo to execute any command

%sudo ALL=(ALL:ALL) ALL

See sudoers(5) for more information on "#include" directives:

includedir /etc/sudoers.d

allow 'sudo gphoto2' to run without supplying a password

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

thats about all I know lol, im very new to this