xmeye icon indicating copy to clipboard operation
xmeye copied to clipboard

TypeError: object method can't be used in 'await' expression

Open dapuzz opened this issue 4 years ago • 1 comments

Hi Nyxnyx, I set up successfully your custom component and I get all camera entities but I see this error in homeassistant.log.

2020-05-03 15:48:45 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 123, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 492, in get
    return await self.handle(request, camera)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 509, in handle
    image = await camera.async_camera_image()
  File "/home/asd/.homeassistant/custom_components/xmeye/camera.py", line 120, in async_camera_image
    return await image.result
TypeError: object method can't be used in 'await' expression

HA Version 107.6 Thank you

dapuzz avatar May 04 '20 08:05 dapuzz

Hi Nyxnyx, I set up successfully your custom component and I get all camera entities but I see this error in homeassistant.log.

2020-05-03 15:48:45 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 123, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 492, in get
    return await self.handle(request, camera)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/camera/__init__.py", line 509, in handle
    image = await camera.async_camera_image()
  File "/home/asd/.homeassistant/custom_components/xmeye/camera.py", line 120, in async_camera_image
    return await image.result
TypeError: object method can't be used in 'await' expression

HA Version 107.6 Thank you

How did you configure it?

felpsnew avatar Jan 04 '24 14:01 felpsnew