jazzyisj / home-assistant-config

My Home Assistant configuration.
67 stars 10 forks source link

ONVIF - Attempted to acquire an already held Lock #35

Closed jazzyisj closed 1 year ago

jazzyisj commented 2 years ago
2021-11-12 07:26:16 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 138, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 618, in get
    return await self.handle(request, camera)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 636, in handle
    image = await _async_get_image(
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 166, in _async_get_image
    image_bytes = await camera.async_camera_image(
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 131, in async_camera_image
    image = await self.device.device.get_snapshot(
  File "/usr/local/lib/python3.9/site-packages/onvif/client.py", line 352, in get_snapshot
    response = await self._snapshot_client.get(uri, auth=auth)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1740, in get
    return await self.request(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1494, in request
    response = await self.send(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1586, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1616, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1655, in _send_handling_redirects
    response = await self._send_single_request(request, timeout)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1699, in _send_single_request
    ) = await transport.handle_async_request(
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 281, in handle_async_request
    ) = await self._pool.handle_async_request(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 219, in handle_async_request
    async with self._connection_acquiry_lock:
  File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/base.py", line 76, in __aenter__
    await self.acquire()
  File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 104, in acquire
    await self._lock.acquire()
  File "/usr/local/lib/python3.9/site-packages/anyio/_core/_synchronization.py", line 119, in acquire
    self.acquire_nowait()
  File "/usr/local/lib/python3.9/site-packages/anyio/_core/_synchronization.py", line 146, in acquire_nowait
    raise RuntimeError('Attempted to acquire an already held Lock')
RuntimeError: Attempted to acquire an already held Lock
jazzyisj commented 1 year ago

Seems to have been resolved.