Closed goldyfruit closed 1 year ago
Ok I think I traced this issue down. I added a traceback.print_stack()
statement in the constructor of the MessageBusClient
HiveMind-voice-sat - ovos_PHAL.service:on_started:26 - INFO - PHAL is started
HiveMind-voice-sat - ovos_workshop.skills.mycroft_skill:__call__:81 - WARNING - skill initialized without bus!! this is legacy behaviour and requires you to call skill.bind(bus) or skill._startup(skill_id, bus)
bus will be required starting on ovos-core 0.1.0
2023-09-12 17:47:20.070 - HiveMind-voice-sat - ovos_bus_client.client.client:__init__:47 - INFO - XXX MessageBusClient ctor XXX
File "/home/ovos/.venv/bin/hivemind-voice-sat", line 8, in <module>
sys.exit(connect())
File "/home/ovos/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/ovos/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/ovos/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ovos/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/ovos/.venv/lib/python3.11/site-packages/hivemind_voice_satellite/__main__.py", line 44, in connect
phal = PHAL(bus=bus)
File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_workshop/skills/mycroft_skill.py", line 85, in __call__
return super().__call__(*args, **kwargs)
File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_PHAL/service.py", line 43, in __init__
bus = MessageBusClient()
File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_bus_client/client/client.py", line 48, in __init__
traceback.print_stack()
This shows that the bus is being stripped in the constructor inheritance chain and then being re-initialized after the super chain is finished
class PHAL(OVOSAbstractApplication):
def __init__(self, config=None, bus=None,
on_ready=on_ready, on_error=on_error,
on_stopping=on_stopping, on_started=on_started, on_alive=on_alive,
watchdog=lambda: None, skill_id="ovos.PHAL", **kwargs):
super().__init__(skill_id=skill_id, bus=bus)
class OVOSAbstractApplication(OVOSSkill):
def __init__(self, skill_id, bus=None, resources_dir=None,
lang=None, settings=None, gui=None, enable_settings_manager=False):
super().__init__(bus=bus, gui=gui, resources_dir=resources_dir,
enable_settings_manager=enable_settings_manager)
class OVOSSkill(MycroftSkill):
def __init__(self, *args, **kwargs):
super(OVOSSkill, self).__init__(*args, **kwargs)
class MycroftSkill(BaseSkill, metaclass=_SkillMetaclass):
def __init__(self, name=None, bus=None, use_settings=True, *args, **kwargs):
super().__init__(name=name, bus=bus, *args, **kwargs)
class _SkillMetaclass(ABCMeta):
def __call__(cls, *args, **kwargs):
Also the presence of the warning emitted here reinforces my idea.
My guess is the problem is at MycroftSkill
layer?