axis
axis copied to clipboard
Server disconnected without sending a response
Hi !
Once again thanks for the amazing work on this component. I've recently added a new Axis camera in my setup and I get the following error in HA:
Logger: homeassistant.components.light
Source: components/axis/light.py:70
Integration: Light (documentation, issues)
First occurred: 5:39:28 PM (1 occurrences)
Last logged: 5:39:28 PM
Error adding entities for domain light with platform axis
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http11.py", line 102, in handle_async_request
raise exc
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http11.py", line 81, in handle_async_request
) = await self._receive_response_headers(**kwargs)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http11.py", line 143, in _receive_response_headers
event = await self._receive_event(timeout=timeout)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http11.py", line 186, in _receive_event
raise RemoteProtocolError(msg)
httpcore.RemoteProtocolError: Server disconnected without sending a response.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/axis/vapix.py", line 265, in request
response = await self.config.session.request(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1506, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1593, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1621, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1658, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1695, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.RemoteProtocolError: Server disconnected without sending a response.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 798, in add_to_platform_finish
await self.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/axis/light.py", line 70, in async_added_to_hass
await self.device.api.vapix.light_control.get_current_intensity(
File "/usr/local/lib/python3.9/site-packages/axis/light_control.py", line 189, in get_current_intensity
return await self._request(
File "/usr/local/lib/python3.9/site-packages/axis/vapix.py", line 296, in request
raise RequestError("Connection error: {}".format(errc))
axis.errors.RequestError: Connection error: Server disconnected without sending a response.
Everything seems to work fine though.
Thanks for your help, Kind regards,
WM
Axis Firmware: 10.10.71 HA: 2022.4.5
Hi,
I'm also facing the same error. What is the cause of this?
Thanks
Exception in thread Thread-1: Traceback (most recent call last): File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_transports/default.py", line 62, in map_httpcore_exceptions yield File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_transports/default.py", line 281, in handle_async_request extensions=request.extensions, File "/home/ai-dev/.local/lib/python3.6/site-packages/httpcore/_async/connection_pool.py", line 235, in handle_async_request method, url, headers=headers, stream=stream, extensions=extensions File "/home/ai-dev/.local/lib/python3.6/site-packages/httpcore/_async/connection.py", line 149, in handle_async_request method, url, headers, stream, extensions File "/home/ai-dev/.local/lib/python3.6/site-packages/httpcore/_async/http11.py", line 128, in handle_async_request ) = await self._receive_response(timeout) File "/home/ai-dev/.local/lib/python3.6/site-packages/httpcore/_async/http11.py", line 189, in _receive_response event = await self._receive_event(timeout) File "/home/ai-dev/.local/lib/python3.6/site-packages/httpcore/_async/http11.py", line 236, in _receive_event raise RemoteProtocolError(msg) httpcore.RemoteProtocolError: Server disconnected without sending a response.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/ai-dev/AI-Engine/Projeto_6_Videre/VidereApp/axis/vapix.py", line 268, in request method, url, auth=self.auth, timeout=TIME_OUT, **kwargs # type: ignore [arg-type] File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_client.py", line 1484, in request request, auth=auth, follow_redirects=follow_redirects File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_client.py", line 1575, in send history=[], File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_client.py", line 1602, in _send_handling_auth history=history, File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_client.py", line 1636, in _send_handling_redirects response = await self._send_single_request(request) File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_client.py", line 1673, in _send_single_request response = await transport.handle_async_request(request) File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_transports/default.py", line 281, in handle_async_request extensions=request.extensions, File "/usr/lib/python3.6/contextlib.py", line 99, in exit self.gen.throw(type, value, traceback) File "/home/ai-dev/.local/lib/python3.6/site-packages/httpx/_transports/default.py", line 79, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.RemoteProtocolError: Server disconnected without sending a response.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(self._args, **self._kwargs) File "utilizador3.py", line 565, in stream go_azi(p,15.0i) File "utilizador3.py", line 115, in go_azi p.move_go_azi(p.loop, azimuth) File "utilizador3.py", line 264, in move_go_azi loop.run_until_complete(self.aux_go_azi(self.p,azimuth)) File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete return future.result() File "utilizador3.py", line 214, in aux_go_azi await p.control(camera=1, pan=azi) File "/home/ai-dev/AI-Engine/Projeto_6_Videre/VidereApp/axis/ptz.py", line 236, in control return await self._request("post", URL, data=data) File "/home/ai-dev/AI-Engine/Projeto_6_Videre/VidereApp/axis/vapix.py", line 298, in request raise RequestError("Connection error: {}".format(errc)) axis.errors.RequestError: Connection error: Server disconnected without sending a response.
Something on server side it seems so I have no idea without more details
Something on server side it seems so I have no idea without more details
Hi, what is considered server side? Yesterday i tried to send you an email through pypi but I got an error saying the email doesn't exist. Here is an excerpt of that email
"The application consists of capturing a frame, process it and move the camera a certain angle to the right or up. This process should happen indefinetely. Currently I have na AXIS camara and a python script that sends and receives commands to/from camara. Everything works fine for few hours of script running, but after some time the following error appears. "
The "error" is what is in the comment above.
Regards
In this context it's the camera which is the server
Yesterday i tried to send you an email through pypi but I got an error saying the email doesn't exist.
Yes I want communication to be in one place and that is github :)
Yesterday i tried to send you an email through pypi but I got an error saying the email doesn't exist.
Yes I want communication to be in one place and that is github :)
Ok, makes sense :)
Do you have any idea why that error appears after some time of system working? Is it possible that the login session on the camera, expires?
Many thanks!
Yesterday i tried to send you an email through pypi but I got an error saying the email doesn't exist.
Yes I want communication to be in one place and that is github :)
Ok, makes sense :)
Do you have any idea why that error appears after some time of system working? Is it possible that the login session on the camera, expires?
Many thanks!
I have no idea. But I should add some kind of retry mechanism if request fails
Yesterday i tried to send you an email through pypi but I got an error saying the email doesn't exist.
Yes I want communication to be in one place and that is github :)
Ok, makes sense :) Do you have any idea why that error appears after some time of system working? Is it possible that the login session on the camera, expires? Many thanks!
I have no idea. But I should add some kind of retry mechanism if request fails
I forgot to mention, I'm using your axis repository in a company project. The idea is to have the camera working 24/7. What is your availability to study this issue? This issue can be critical for the project.
Your help is very appreciated. Just tell me what you need to understand better the issue.
Thank you
Right now I'm traveling. There are some rewrites I want to do of the library to help improve overall design and functionality. I plan to come back to work on this project in the not too distant future (as I have many different things going on)
Hi, do you have any news? Did you try to study this issue?
Hi, do you have any news? Did you try to study this issue?
No. Still busy on other projects.
Hi, do you have any news? Did you try to study this issue?
I was thinking, maybe we can do something unofficial for your case if you still need it, I don't need to publish a real release since you're running your own stuff. Does that sound ok?
Hi, I was able to solve my issue. Instead of using your repository, I'm using directly the axis API. I think for my project and the way I wanted to do, your repository is not compatible. Thank you anyway!