core: System Health Error
The problem
Hi, i got this error when iam loading system Health:
`Logger: homeassistant.components.system_health Source: components/recorder/system_health/mysql.py:10 Integration: System Health (documentation, issues) First occurred: June 1, 2022, 9:20:02 PM (7 occurrences) Last logged: 11:33:07 PM
Error fetching info Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/system_health/init.py”, line 68, in get_integration_info data = await registration.info_callback(hass) File “/usr/src/homeassistant/homeassistant/components/recorder/system_health/init.py”, line 67, in system_health_info db_stats = await instance.async_add_executor_job( File “/usr/local/lib/python3.9/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) File “/usr/src/homeassistant/homeassistant/components/recorder/system_health/init.py”, line 40, in _get_db_stats and (db_bytes := get_size(session, database_name)) File “/usr/src/homeassistant/homeassistant/components/recorder/system_health/mysql.py”, line 10, in db_size_bytes return float( TypeError: float() argument must be a string or a number, not ‘NoneType’ `
What version of Home Assistant Core has the issue?
2022.6.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:96
Integration: Recorder (documentation, issues)
First occurred: June 1, 2022, 21:20:02 (7 occurrences)
Last logged: 23:33:07
Error executing query: float() argument must be a string or a number, not 'NoneType'
—-
Logger: homeassistant.components.system_health
Source: components/recorder/system_health/mysql.py:10
Integration: System Health (documentation, issues)
First occurred: June 1, 2022, 21:20:02 (7 occurrences)
Last logged: 23:33:07
Error fetching info
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/system_health/__init__.py", line 68, in get_integration_info
data = await registration.info_callback(hass)
File "/usr/src/homeassistant/homeassistant/components/recorder/system_health/__init__.py", line 67, in system_health_info
db_stats = await instance.async_add_executor_job(
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/recorder/system_health/__init__.py", line 40, in _get_db_stats
and (db_bytes := get_size(session, database_name))
File "/usr/src/homeassistant/homeassistant/components/recorder/system_health/mysql.py", line 10, in db_size_bytes
return float(
TypeError: float() argument must be a string or a number, not 'NoneType'
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (8 by maintainers)
I used to deal with Oracle databases, so definitely not an expert here but could it be that the returned value is not being recognized as a valid type? Notice in the above screenshots the output of the DB size probably depends on the environment settings and will include either a comma or a period as deliminator, e.g.: 1)
2)
3)

All have different thousands deliminator - maybe, that’s something to look into as the error clearly states: float() argument must be a string or a number, not ‘NoneType’ ?
Hope it helps.
Please post your
db_url. It looks like it can’t part it for some reason or schemas needed to fetch the data from mysql have ben disabled on the server side.