Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octolapse Unable to connect to the provided snapshot URL #498

Open
sv0o opened this issue Jul 18, 2024 · 1 comment
Open

Octolapse Unable to connect to the provided snapshot URL #498

sv0o opened this issue Jul 18, 2024 · 1 comment

Comments

@sv0o
Copy link

sv0o commented Jul 18, 2024

I had tested Octolapse 0.4.5 in Octo4A 2.0.0 and it was working.

Now, it keeps complaining that it can't connect to the snapshot URL of the Default Octopi 0.16.0 camera profile. it looks like it's timing out in the logs. I had been trying out manual focus and flash with the new camera stack, but I turned those off and I get the same result. I tried to increase the timeout to ten seconds but that didn't seem to do anything.

Since the snapshot URL works fine outside of octolapse, I would find fault with that plugin. But if it worked OK before I updated to Octo4A 2.1.0, is there any more info I could provide to FormerLurker?

plugin.octolapse.log:

2024-07-18 00:26:54,624 - octolapse.timelapse - DEBUG - Setting job-on-hold lock.
2024-07-18 00:26:54,627 - octolapse.timelapse - INFO - Print Start Detected. Command: M110 N0, Tags:{'source:job', 'trigger:comm.start_print', 'trigger:comm.reset_line_numbers'}
2024-07-18 00:26:54,661 - octolapse.init - INFO - Print start detected, attempting to start timelapse.
2024-07-18 00:26:54,686 - octolapse.init - DEBUG - Testing timelapse configuration.
2024-07-18 00:27:05,495 - octolapse.camera - ERROR - Unable to connect to the provided snapshot URL of http://192.168.1.32:5001/snapshot for the 'Webcam1 - Default OctoPi 0.16.0' camera profile.
Traceback (most recent call last):
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/sentry_sdk/integrations/stdlib.py", line 128, in getresponse
rv = real_getresponse(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 1395, in getresponse
response.begin()
File "/usr/lib/python3.11/http/client.py", line 325, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/http/client.py", line 286, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/socket.py", line 706, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 469, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 358, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.1.32', port=5001): Read timed out. (read timeout=2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 827, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 827, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 827, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.32', port=5001): Max retries exceeded with url: /snapshot (Caused by ReadTimeoutError("HTTPConnectionPool(host='192.168.1.32', port=5001): Read timed out. (read timeout=2)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/octoprint_octolapse/camera.py", line 578, in _test_web_camera
r = retry_session.get(url, stream=True, timeout=timeout_seconds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/octoprint/octoprint-venv/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.32', port=5001): Max retries exceeded with url: /snapshot (Caused by ReadTimeoutError("HTTPConnectionPool(host='192.168.1.32', port=5001): Read timed out. (read timeout=2)"))
2024-07-18 00:27:05,568 - octolapse.init - INFO - Print cancelling.
2024-07-18 00:27:05,581 - octolapse.timelapse - DEBUG - Releasing job-on-hold lock.

@sv0o
Copy link
Author

sv0o commented Jul 19, 2024

Well, I think I have learned to not rely on auto update scripts and stuff.

after further testing, I find that Octolapse has no issues accessing snapshots from the default camera in Octo4a 2.1.0 as long as I uninstall the app, then install from the new apk and restore octoprint backups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant