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

Unsupported LF language prevents intent handling #123

Closed
NeonDaniel opened this issue May 20, 2022 · 1 comment · Fixed by #125
Closed

Unsupported LF language prevents intent handling #123

NeonDaniel opened this issue May 20, 2022 · 1 comment · Fixed by #125
Labels
bug Something isn't working

Comments

@NeonDaniel
Copy link
Member

It appears that a message in a language not supported by LF raises an exception in the normalization step before intent processing. It seems like this should skip normalization and proceed to intent parsing, rather than raising an exception

2022-05-20 22:27:51.837 - neon_skill - mycroft.skills.intent_service:handle_utterance:338 - ERROR - Invalid input: ru
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/mycroft/skills/intent_service.py", line 291, in handle_utterance
    setup_locale(lang)  # set default lang
  File "/usr/local/lib/python3.8/site-packages/mycroft/configuration/locale.py", line 93, in setup_locale
    load_languages([lang_code, "en-us"])
  File "/usr/local/lib/python3.8/site-packages/mycroft/configuration/locale.py", line 82, in load_languages
    LF.load_languages(langs)
  File "/usr/local/lib/python3.8/site-packages/lingua_franca/internal.py", line 198, in load_languages
    load_language(lang)
  File "/usr/local/lib/python3.8/site-packages/lingua_franca/internal.py", line 187, in load_language
    _set_active_langs(__loaded_langs)
  File "/usr/local/lib/python3.8/site-packages/lingua_franca/internal.py", line 129, in _set_active_langs
    set_default_lang(get_full_lang_code(__loaded_langs[0]))
  File "/usr/local/lib/python3.8/site-packages/lingua_franca/internal.py", line 283, in set_default_lang
    _refresh_function_dict()
  File "/usr/local/lib/python3.8/site-packages/lingua_franca/internal.py", line 137, in _refresh_function_dict
    populate_localized_function_dict(mod, langs=__loaded_langs)
  File "/usr/local/lib/python3.8/site-packages/lingua_franca/internal.py", line 633, in populate_localized_function_dict
    primary_lang_code = get_primary_lang_code(lang_code)
  File "/usr/local/lib/python3.8/site-packages/lingua_franca/internal.py", line 300, in get_primary_lang_code
    lang = __get_primary_lang_code_deprecation_warning(lang)
  File "/usr/local/lib/python3.8/site-packages/lingua_franca/internal.py", line 340, in __get_primary_lang_code_deprecation_warning
    raise(ValueError("Invalid input: " + lang))
ValueError: Invalid input: ru
@JarbasAl
Copy link
Member

Note: ru is supported in latest ovos-lingua-franca release

@JarbasAl JarbasAl added the bug Something isn't working label Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants