Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

dialog_renderer None if valid dialog directory does not exist #2567

@krisgesling

Description

@krisgesling

Issue:

If a Skill does not have a valid dialog or locale directory, and attempts to speak some dialog using strings within the Skill eg

self.speak_dialog('say something')

then the method fails as the dialog_renderer has not been assigned:

  File "/home/kris/mycroft-core/mycroft/skills/mycroft_skill/mycroft_skill.py", line 1102, in speak_dialog
    self.speak(self.dialog_renderer.render(key, data),
AttributeError: 'NoneType' object has no attribute 'render'

Creating an empty dialog/en-us/ directory resolves the issue.

Expectation

As the Skill author is not using a dialog string, the expectation is that the directory is not required.

Or could provide a more descriptive error message for this case, as it may also be that they have incorrectly spelled the directory name eg local/en_us

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions