-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
SQL Sensor adds non JSON serializable types to the state machine #13021
Copy link
Copy link
Closed
Description
Home Assistant release (hass --version):
0.65
Python release (python3 --version):
3.6.4
Component/platform:
IOS and browser
Description of problem:
Can't open IOS app after upgrade. Keeps 'Loading data...'
Normal browser seems to be involved also.
Expected:
Opening
Logging:
2018-03-09 21:38:55 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/remote.py", line 127, in default
return json.JSONEncoder.default(self, o)
File "/usr/local/lib/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'Decimal' is not JSON serializable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/remote.py", line 133, in default
for child_obj in o]
TypeError: 'decimal.Decimal' object is not iterable
2018-03-09 21:40:47 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api.py", line 331, in handle
msg = await wsock.receive_json()
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_ws.py", line 397, in receive_json
data = await self.receive_str(timeout=timeout)
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_ws.py", line 381, in receive_str
msg = await self.receive(timeout)
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_ws.py", line 345, in receive
msg = await self._reader.read()
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/streams.py", line 571, in read
return await super().read()
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/streams.py", line 533, in read
await self._waiter
File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 238, in result
raise CancelledError
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
resp = await self._request_handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_app.py", line 310, in _handle
resp = await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 88, in impl
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 68, in staticresource_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 27, in real_ip_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 52, in auth_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 100, in handle
result = await result
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api.py", line 210, in get
return await ActiveConnection(request.app['hass'], request).handle()
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api.py", line 393, in handle
await self._writer_task
File "/usr/local/lib/python3.6/asyncio/futures.py", line 329, in __iter__
return self.result() # May raise too.
File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
raise self._exception
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api.py", line 243, in _writer
await self.wsock.send_json(message, dumps=JSON_DUMP)
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_ws.py", line 263, in send_json
await self.send_str(dumps(data), compress=compress)
File "/usr/local/lib/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/local/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/remote.py", line 136, in default
return json.JSONEncoder.default(self, o)
File "/usr/local/lib/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'Decimal' is not JSON serializable
2018-03-09 21:45:25 ERROR (MainThread) [homeassistant.components.websocket_api] WS 1576122704: Client exceeded max pending messages [2]: 512
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels