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

Fails to create the skills settings folder and settings.json at first run #14

Closed
j1nx opened this issue Jan 13, 2024 · 0 comments · Fixed by #15
Closed

Fails to create the skills settings folder and settings.json at first run #14

j1nx opened this issue Jan 13, 2024 · 0 comments · Fixed by #15

Comments

@j1nx
Copy link
Member

j1nx commented Jan 13, 2024

I just added the chatgpt skill to the ovos-core skills.list and run the container.

This is what you get in the logs when you try to load it for the first time and obviously the settings.json is not there with the API key

Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.092 - skill-ovos-fallback-chatgpt.openvoiceos - ERROR - Skill initialization failed
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: Traceback (most recent call last):
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_workshop/skills/ovos.py", line 728, in _startup
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     self.initialize()
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_fallback_chatgpt/__init__.py", line 26, in initialize
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     self.chat = OpenAIPersonaSolver(config=self.settings)
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_solver_openai_persona/__init__.py", line 9, in __init__
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     super().__init__(config=config)
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_solver_openai_persona/engines.py", line 70, in __init__
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     raise ValueError("key must be set")
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: ValueError: key must be set
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.096 - skill-ovos-fallback-chatgpt.openvoiceos - ERROR - Failed to shutdown gui for skill-ovos-fallback-chatgpt.openvoiceos: <bound method GUIInterface.gui_set of <o>
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.114 - skills - ovos_workshop.skill_launcher:_create_skill_instance:473 - WARNING - Legacy skill: key must be set
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.117 - skills - ovos_workshop.skill_launcher:_create_skill_instance:482 - WARNING - Deprecation version=0.1.0. Caller=ovos_core.skill_manager:360. This initializatio>
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.232 - skills - ovos_plugin_manager.language:create:233 - INFO - Loaded the Language Translation plugin ovos-translate-plugin-server
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.240 - skills - ovos_solver_openai_persona.engines:__init__:69 - ERROR - key not set in config
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.240 - skill-ovos-fallback-chatgpt.openvoiceos - ERROR - Skill initialization failed
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: Traceback (most recent call last):
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_workshop/skills/ovos.py", line 728, in _startup
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     self.initialize()
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_fallback_chatgpt/__init__.py", line 26, in initialize
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     self.chat = OpenAIPersonaSolver(config=self.settings)
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_solver_openai_persona/__init__.py", line 9, in __init__
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     super().__init__(config=config)
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_solver_openai_persona/engines.py", line 70, in __init__
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     raise ValueError("key must be set")
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: ValueError: key must be set
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.243 - skill-ovos-fallback-chatgpt.openvoiceos - ERROR - Failed to shutdown gui for skill-ovos-fallback-chatgpt.openvoiceos: <bound method GUIInterface.gui_set of <o>
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.261 - skills - ovos_workshop.skill_launcher:_create_skill_instance:487 - ERROR - Skill __init__ failed with key must be set
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: Traceback (most recent call last):
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 485, in _create_skill_instance
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     self.instance._startup(self.bus, self.skill_id)
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_workshop/skills/ovos.py", line 738, in _startup
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     raise e
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_workshop/skills/ovos.py", line 728, in _startup
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     self.initialize()
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_fallback_chatgpt/__init__.py", line 26, in initialize
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     self.chat = OpenAIPersonaSolver(config=self.settings)
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_solver_openai_persona/__init__.py", line 9, in __init__
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     super().__init__(config=config)
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_solver_openai_persona/engines.py", line 70, in __init__
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]:     raise ValueError("key must be set")
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: ValueError: key must be set
Jan 13 12:14:39 OpenVoiceOS-840dca ovos-core[8937]: 2024-01-13 12:14:39.270 - skills - ovos_workshop.skill_launcher:_communicate_load_status:510 - ERROR - Skill skill-ovos-fallback-chatgpt.openvoiceos failed to load

I get that the skills fails to load because of the missing API, however because it errors out, it also soes not create the skills settings folder and does not write the settings.json

Can these type of things not be improved that on first run (which is a flag) it just creates the folder and json file with an empty API key and just more silent fails to load with a line; chatgpt skipped, please set your API key in the settings.json?

(I had to create the folder and settings.json manually)

JarbasAl added a commit that referenced this issue Jan 13, 2024
JarbasAl added a commit that referenced this issue Jan 22, 2024
* fix/not_loading_without_key

closes #14

* Update __init__.py
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

Successfully merging a pull request may close this issue.

1 participant