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

cannot access local variable 'theme' where it is not associated with a value #5

Open
goldyfruit opened this issue Apr 6, 2023 · 2 comments

Comments

@goldyfruit
Copy link

During the ovos-phal service start, I can see an error relates to this plugin.

ovos_phal           | 2023-04-06 10:44:07.221 - OVOS - ovos_PHAL_plugin_color_scheme_manager:provide_theme:75 - ERROR - cannot access local variable 'theme' where it is not associated with a value
@NeonDaniel
Copy link
Contributor

Looks like this will happen if there's no theme file (https://github.com/OpenVoiceOS/ovos-PHAL-plugin-color-scheme-manager/blob/dev/ovos_PHAL_plugin_color_scheme_manager/__init__.py#L55-L62).

@AIIX woud it make sense to return a default theme, or handle no theme file with a debug or info log instead of logging an error?

@AIIX
Copy link
Collaborator

AIIX commented Apr 6, 2023

Default themes json files are installed by ovos shell, so there will always be default themes installed, the image / platform needs to provide a default "OvosTheme" config file in /etc/xdg with one of the themes selected.

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

3 participants