dahua icon indicating copy to clipboard operation
dahua copied to clipboard

Error with update 0.9.75

Open Pastaloverzzz opened this issue 3 months ago • 7 comments

I did the latest update from a few hours ago and now get the following errors in the log.

Logger: custom_components.dahua Bron: custom_components/dahua/client.py:772 integratie: Dahua (documentatie, problemen) Eerst voorgekomen: 10:02:56 (12 gebeurtenissen) Laatst gelogd: 10:13:03

Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 347, in _wait await waiter asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/dahua/client.py", line 772, in stream_events async for data, _ in response.content.iter_chunks(): on_receive(data, channel) File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 71, in anext rv = await self._stream.readchunk() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 476, in readchunk await self._wait("readchunk") File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 346, in _wait with self._timer: ^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiohttp/helpers.py", line 685, in exit raise asyncio.TimeoutError from exc_val TimeoutError

Pastaloverzzz avatar Oct 10 '25 08:10 Pastaloverzzz

I think this is the same bug as #467. This has been occurring since version 0.9.72. I've been running 0.9.71 since then, and this problem doesn't occur. Is it possible to look into this?

chrisriteco avatar Oct 10 '25 14:10 chrisriteco

Same issue here. Please fix and share updated client.py file.

Thanks

DeveloperSzkodziu avatar Oct 10 '25 22:10 DeveloperSzkodziu

Same issue here. Please fix and share updated client.py file.

If you have the file editor plugin (or you are comfortable editing it another way) you can go into /homeassistant/custom_components/dahua/client.py and change starting with line 774:

            except Exception as exception:
                _LOGGER.exception(exception)

to

            except Exception as exception:
                pass
                #_LOGGER.exception(exception)

(I just commented the logger line because I don't like deleting code)

hausmanconsulting avatar Oct 10 '25 22:10 hausmanconsulting

@hausmanconsulting thanks for this - works fine! But still, it is workaround. Would be good to have permament fix for this :)

DeveloperSzkodziu avatar Oct 10 '25 23:10 DeveloperSzkodziu

Thanks. I'll get this in tonight

rroller avatar Oct 10 '25 23:10 rroller

@rroller - amazing, thanks. Would you mind sharing updated client.py file in this bug thread once ready? Cheers.

DeveloperSzkodziu avatar Oct 10 '25 23:10 DeveloperSzkodziu

Released in https://github.com/rroller/dahua/releases/tag/0.9.76

rroller avatar Oct 11 '25 00:10 rroller