System Health details
System Health
| version |
core-2021.9.1 |
| installation_type |
Home Assistant Container |
| dev |
false |
| hassio |
false |
| docker |
true |
| user |
root |
| virtualenv |
false |
| python_version |
3.9.6 |
| os_name |
Linux |
| os_version |
5.11.0-27-generic |
| arch |
x86_64 |
| timezone |
Australia/Melbourne |
Home Assistant Community Store
| GitHub API |
ok |
| Github API Calls Remaining |
4485 |
| Installed Version |
1.15.1 |
| Stage |
running |
| Available Repositories |
882 |
| Installed Repositories |
22 |
Home Assistant Cloud
| logged_in |
false |
| can_reach_cert_server |
ok |
| can_reach_cloud_auth |
ok |
| can_reach_cloud |
ok |
Lovelace
| dashboards |
2 |
| resources |
8 |
| views |
7 |
| mode |
storage |
Checklist
Describe the issue
HACS is failing on a version check. I ‘kludged’ the code to get by, but I believe it relates to AwesomeVersion not handling a version string starting with ‘core-’
I did this to get by for now:
in misc.py
def version_left_higher_then_right(left: str, right: str) -> bool:
"""Return a bool if source is newer than target, will also be true if identical."""
# KLUDGE-start
if left.find('core-') >=0:
left = left.replace('core-','')
if right.find('core-') >=0:
right = right.replace('core-','')
# KLUDGE-end
return version.version_left_higher_then_right(left, right)
Its a definite hack as I don’t know what the intent of the version checking is, so this might be totally the wrong thing to do logically 😃
Reproduction steps
- upgraded to core-2021.9.1
- click on HACS front page
- all integrations are missing.
…
Debug logs
Example log:
2021-09-03 11:54:04 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback HACSSensor._update_and_write_state(<Event hacs/status[L]>)
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/config/custom_components/hacs/sensor.py", line 55, in _update_and_write_state
self._update()
File "/config/custom_components/hacs/sensor.py", line 68, in _update
repository.pending_upgrade
File "/config/custom_components/hacs/helpers/properties/pending_update.py", line 23, in pending_upgrade
return self.pending_update
File "/config/custom_components/hacs/helpers/properties/pending_update.py", line 8, in pending_update
if not self.can_install:
File "/config/custom_components/hacs/helpers/properties/can_be_installed.py", line 21, in can_install
return self.can_be_installed
File "/config/custom_components/hacs/helpers/properties/can_be_installed.py", line 12, in can_be_installed
if not version_left_higher_then_right(
File "/config/custom_components/hacs/helpers/functions/misc.py", line 27, in version_left_higher_then_right
return version.version_left_higher_then_right(left, right)
File "/config/custom_components/hacs/utils/version.py", line 12, in version_left_higher_then_right
return AwesomeVersion(left) >= AwesomeVersion(right)
File "/usr/local/lib/python3.9/site-packages/awesomeversion/awesomeversion.py", line 129, in __ge__
return self.__eq__(compareto) or self.__gt__(compareto)
File "/usr/local/lib/python3.9/site-packages/awesomeversion/awesomeversion.py", line 117, in __gt__
raise AwesomeVersionCompare(
awesomeversion.exceptions.AwesomeVersionCompare: Can't compare unknown
Solved by reinstalling HACS according official guide.