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

Kalliope failed to start after adding MM part into brain.yml #8

Open
Dimasua opened this issue Aug 22, 2021 · 10 comments
Open

Kalliope failed to start after adding MM part into brain.yml #8

Dimasua opened this issue Aug 22, 2021 · 10 comments

Comments

@Dimasua
Copy link

Dimasua commented Aug 22, 2021

I added the below part to the brain.yml

image

Also added on_start_speaking: "mm-say" to settings.yml. MM Neuron is installed.

After that Kalliope failed to start during the boot process.

image

When I remove that reference to the MM from the brain.yml, Kalliope starts again.

@Sispheor
Copy link
Member

Please run kalliope with debug mode and give the output. Here there is no clue of what is wrong

@Dimasua
Copy link
Author

Dimasua commented Aug 22, 2021

Yes, please see below the error log from Kalliope:

2021-08-22 18:43:55 :: kalliope-0.7.1 :: Logger ready
2021-08-22 18:43:55 :: kalliope-0.7.1 :: kalliope args: Namespace(action='start', brain_file=None, deaf=False, debug=True, git_url=None, neuron_name=None, run_order=None, run_synapse=None, signal_name=None, stt_name=None, trigger_name=None, tts_name=None)
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Try to load file from 1: /home/pi/kalliope_starter_en/settings.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: File found in /home/pi/kalliope_starter_en/settings.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: File path to load: /home/pi/kalliope_starter_en/settings.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Current processor type: armv7l
2021-08-22 18:43:55 :: kalliope-0.7.1 :: File path to load: /home/pi/kalliope_starter_en/settings.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Default STT: google
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Default TTS: pico2wave
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Default Trigger name: snowboy
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Default Player name: mplayer
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Resource directory synapse: {'neuron': 'resources/neurons', 'stt': 'resources/stt', 'tts': 'resources/tts', 'signal': 'resources/signal'}
2021-08-22 18:43:55 :: kalliope-0.7.1 :: [SettingLoader] Neuron resource folder path loaded: resources/neurons
2021-08-22 18:43:55 :: kalliope-0.7.1 :: [SettingLoader] STT resource folder path loaded: resources/stt
2021-08-22 18:43:55 :: kalliope-0.7.1 :: [SettingLoader] TTS resource folder path loaded: resources/tts
2021-08-22 18:43:55 :: kalliope-0.7.1 :: [SettingLoader] Signal resource folder path loaded: resources/signal
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Try to load file from 1: /home/pi/kalliope_starter_en/global_variables/variables.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: File found in /home/pi/kalliope_starter_en/global_variables/variables.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: File path to load: /home/pi/kalliope_starter_en/global_variables/variables.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: [SettingsLoader] Options: {'name': 'Options', 'recognizer_multiplier': 1.0, 'recognizer_energy_ratio': 1.5, 'recognizer_recording_timeout': 15.0, 'recognizer_recording_timeout_with_silence': 3.0, 'deaf': False, 'mute': False}
2021-08-22 18:43:55 :: kalliope-0.7.1 :: [SettingsLoader] send_anonymous_usage_stats: bf9b12bf1e3c497a9fa1c86436fc44a3
2021-08-22 18:43:55 :: kalliope-0.7.1 :: Try to load file from 1: /home/pi/kalliope_starter_en/brain.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: File found in /home/pi/kalliope_starter_en/brain.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: File path to load: /home/pi/kalliope_starter_en/brain.yml
2021-08-22 18:43:55 :: kalliope-0.7.1 :: File path to load: /home/pi/kalliope_starter_en/brain.yml
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/kalliope/core/ConfigurationManager/ConfigurationChecker.py", line 151, in check_neuron_exist
mod = import(package_name, fromlist=[neuron_module_name.capitalize()])
ModuleNotFoundError: No module named 'kalliope.neurons.mm_url'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/kalliope", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/kalliope/init.py", line 136, in main
brain_loader = BrainLoader(file_path=brain_file)
File "/usr/local/lib/python3.7/dist-packages/kalliope/core/Models/Singleton.py", line 6, in call
cls._instances[cls] = super(Singleton, cls).call(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/kalliope/core/ConfigurationManager/BrainLoader.py", line 45, in init
self.brain = self.load_brain()
File "/usr/local/lib/python3.7/dist-packages/kalliope/core/ConfigurationManager/BrainLoader.py", line 91, in load_brain
neurons = self.get_neurons(synapses_dict["neurons"], self.settings)
File "/usr/local/lib/python3.7/dist-packages/kalliope/core/ConfigurationManager/BrainLoader.py", line 127, in get_neurons
if ConfigurationChecker().check_neuron_dict(neuron_dict):
File "/usr/local/lib/python3.7/dist-packages/kalliope/core/ConfigurationManager/ConfigurationChecker.py", line 165, in check_neuron_dict
check_neuron_exist(neuron_name)
File "/usr/local/lib/python3.7/dist-packages/kalliope/core/ConfigurationManager/ConfigurationChecker.py", line 160, in check_neuron_exist
package_name))
kalliope.core.Utils.Utils.KalliopeModuleNotFoundError: [ImportError] The module Mm_url does not exist in the package kalliope.neurons.mm_url.mm_url

@Sispheor
Copy link
Member

Weird that the log mention mm_url.mm_url instead of
magic_mirror.mm_url.
You have a yaml syntax error probably.

@Dimasua
Copy link
Author

Dimasua commented Aug 22, 2021

Do you mean in the brain.yml file?

@Sispheor
Copy link
Member

Yes.
Is this the only part of the brain where you used this neuron?
Copy and paste your brain here using the syntax highlight so we can check the syntax.
It's recommended to use an ide like vscode to edit pour files

@Dimasua
Copy link
Author

Dimasua commented Aug 23, 2021

---

  - includes:
        - brains/say.yml
        - brains/systemdate.yml
        - brains/neurotransmitter.yml
        - brains/uri.yml

  - name: "order-not-found-synapse"
    signals: []
    neurons:
      - say:
          message:
            - "I haven't understood"
            - "I don't know this order"
            - "Please renew your order"
            - "Would you please reword your order"
            - "Can you please reformulate your order"
            - "I don't recognize that order"

  - name: "on-triggered-synapse"
    signals: []
    neurons:
      - say:
          message:
            - "yes sir?"
            - "I'm listening"
            - "I'm listening to you"
            - "sir?"
            - "what can i do for you?"
            - "Speaking"
            - "how can i help you?"

  - name: "on-start-synapse"
    signals: []
    neurons:
      - say:
          message: "I'm ready"

  - name: "mm-say"
    signals: []
    neurons:
    - magic_mirror:
        mm_url: "http://127.0.0.1:8080/kalliope"
        notification: "KALLIOPE"
        payload: "{{ kalliope_memory['kalliope_last_tts_message'] }}"

  - name: "mm-alert"
    signals:
      - order: "send an alert to magic mirror"
    neurons:
      - magic_mirror:
        mm_url: "http://127.0.0.1:8080/kalliope"
        notification: "SHOW_ALERT"
        payload:
          title: "my alert title"
          message: "the message"
          timer: 5000

@Sispheor
Copy link
Member

Looks ok.
You can add an indentation on the neuron list of the "mm-say" synapse. But it's yaml accept this syntax anyway so it's not really a mistake.
The neuron is well installed in the neuron folder and named "magic_mirror"?

@Dimasua
Copy link
Author

Dimasua commented Aug 24, 2021

The neuron is here:
image

@Dimasua
Copy link
Author

Dimasua commented Aug 24, 2021

May be something with IP addresses?

@Sispheor
Copy link
Member

No. This error is usually related to bad yaml syntax

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

2 participants