Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garmin connect component does not work - Unknown error occurred #149

Open
jurdikla opened this issue Mar 14, 2024 · 6 comments
Open

Garmin connect component does not work - Unknown error occurred #149

jurdikla opened this issue Mar 14, 2024 · 6 comments

Comments

@jurdikla
Copy link

After installing the latest version of Home Assistant, the Garmin connect component does not work.
I tried uninstalling and reinstalling but nothing helped.

Home Assistant

Core
2024.3.0
Supervisor
2024.03.0
Operating System
12.1
Frontend
20240306.0

@jurdikla
Copy link
Author

It still doesn't work for me. :-(

Snímka obrazovky 2024-04-17 083921
Snímka obrazovky 2024-04-17 084001

@jurdikla
Copy link
Author

I have already figured out where the problem is.
I had to change the language from Slovak to English in the settings.
I was then able to add the garmin account to Home Assistant.
Can you fix it?
Snímka obrazovky 2024-04-26 081837

@misko903
Copy link

The same issue. I have Slovak language as my HA language too. Let's try jurdikla tip.

But please fix it, thanks :)

@misko903
Copy link

Update: after changing the language to Slovak and rebooting, it's not working again.

@misko903
Copy link

Logger: homeassistant.bootstrap
Zdroj: util/json.py:81
Prvýkrát sa vyskytol: 18:59:02 (1 výskytov)
Naposledy prihlásený: 18:59:02

Error setting up integration garmin_connect - received exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/json.py", line 75, in load_json
return orjson.loads(fdesc.read()) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^
orjson.JSONDecodeError: trailing comma is not allowed: line 18 column 58 (char 599)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 185, in async_setup_component
await future
File "/usr/src/homeassistant/homeassistant/setup.py", line 185, in async_setup_component
await future
File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component
result = await _async_setup_component(hass, domain, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/setup.py", line 446, in _async_setup_component
await load_translations_task
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 420, in async_load_integrations
await _async_get_translations_cache(hass).async_load(
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 179, in async_load
await self._async_load(language, components_to_load)
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 232, in _async_load
translation_by_language_strings = await _async_get_component_strings(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 115, in _async_get_component_strings
loaded_translations_by_language = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 59, in _load_translations_files_by_language
loaded_json = load_json(translation_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/json.py", line 81, in load_json
raise HomeAssistantError(f"Error while loading {filename}: {error}") from error
homeassistant.exceptions.HomeAssistantError: Error while loading /config/custom_components/garmin_connect/translations/sk.json: trailing comma is not allowed: line 18 column 58 (char 599)

misko903 added a commit to misko903/home-assistant-garmin_connect that referenced this issue Nov 12, 2024
Solved the issue cyberjunky#149
Confirmed that it works with Slovak language mutation of Home Assistant.
@misko903
Copy link

it works with
custom_components/garmin_connect/translations/sk.json
changed to this:


{
    "config": {
        "abort": {
            "already_configured": "Účet je už nakonfigurovaný"
        },
        "error": {
            "cannot_connect": "Nepodarilo sa pripojiť",
            "invalid_auth": "Neplatné overenie",
            "too_many_requests": "Príliš veľa žiadostí, skúste to neskôr.",
            "unknown": "Neočakávaná chyba"
        },
        "step": {
            "user": {
                "data": {
                    "password": "Heslo",
                    "username": "Užívateľské meno"
                },
                "description": "Zadajte svoje poverovacie údaje.",
                "title": "Garmin Connect"
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants