question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HACS main page is not showing integrations: crashing on unknown version in AwesomeVersion code as version string contains the word 'core-'

See original GitHub issue

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

  • I’m running the newest version of HACS https://github.com/hacs/integration/releases/latest
  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • I have read https://hacs.xyz/docs/issues
  • This issue is related to the backend (integration part) of HACS.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).

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

  1. upgraded to core-2021.9.1
  2. click on HACS front page
  3. 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Masterz69commented, Sep 3, 2021

Solved by reinstalling HACS according official guide.

0reactions
DrSpaldocommented, Sep 5, 2021

For those reading, I had to delete the entire hacs folder then reinstall as per the official guide. When I reinstalled without removing the folder first, it didn’t work. It appears working again for me after doing that 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

After update to v1.18.0, HACS main page is still not ... - GitHub
I'm running the newest version of HACS https://github.com/hacs/integration/releases/latest · I have enabled debug logging for my installation. · I ...
Read more >
2021.3: My Oh My - Home Assistant
Introducing My Home Assistant, a new UI for service calls, 100% Fans, Z-Wave JS updates and Supervisor updates.
Read more >
Word keeps crashing every time when it is opened on Mac ...
I tried to install Microsoft Office version 16.58 both from the website and App Store several times and keep them up to date...
Read more >
session deleted because of page crash from unknown error ...
I start the script per Cron and from time to time it crashes. So it'r really irregular, sometimes it runs well through. I'v...
Read more >
Crash affecting iOS 15/15.1 on iPad | Apple Developer Forums
Our application is currently crashing in production for ipad running iOS ... 1:iPad7,12:13 Code Type: ARM-64 (Native) Role: Non UI OS Version: iPhone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found