MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    AlexaPi Issue

    Scheduled Pinned Locked Moved Solved Troubleshooting
    5 Posts 2 Posters 1.8k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      StrIIker
      last edited by

      Hello,
      I previously had AlexaPi running from its initial install. When starting up the computer, I would hear it say “hello”. I have since connected a microphone and went through the configuration steps listed in the git wiki for AlexaPi. I have validated that the microphone works (I can record my voice to a wave file and play it back). What is not working now is AlexaPi… I see the following in the status error message now…

      Oct 04 13:35:21 mirror01 python[578]: File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
      Oct 04 13:35:21 mirror01 python[578]: self.current_event = self.state()
      Oct 04 13:35:21 mirror01 python[578]: File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key
      Oct 04 13:35:21 mirror01 python[578]: "expected <block end>, but found %r" % token.id, token.start_mark)
      Oct 04 13:35:21 mirror01 python[578]: yaml.parser.ParserError: while parsing a block mapping
      Oct 04 13:35:21 mirror01 python[578]: in "/etc/opt/AlexaPi/config.yaml", line 7, column 1
      Oct 04 13:35:21 mirror01 python[578]: expected <block end>, but found '<block mapping start>'
      Oct 04 13:35:21 mirror01 python[578]: in "/etc/opt/AlexaPi/config.yaml", line 16, column 3
      Oct 04 13:35:21 mirror01 systemd[1]: AlexaPi.service: main process exited, code=exited, status=1/FAILURE
      Oct 04 13:35:21 mirror01 systemd[1]: Unit AlexaPi.service entered failed state.
      

      When I examine /etc/opt/AlexaPi/config.yaml , I do not see any issues… Here’s the start of the file… row 7 is where the logging is set…

      # See https://github.com/alexa-pi/AlexaPi/wiki/Audio-setup-&-debugging
      # to get a better idea of how to set things in here
      
      # Level of log output
      # default: INFO
      # set to DEBUG for verbose logging
      logging: INFO
      
      sound:
        # Name of your microphone device: "raspberrypi"
        # leave empty for default
      input_device: "pulse"
      output: "pulse"
      output_device: ""
      
        playback_handler: "vlc"
      
        # you can go here with alsa, pulse or others
        # keep blank for the best audio output selected by the underlying code
        output: "alsa"
        # output device: "raspberrypi"
        # currently supports ALSA only
        output_device: "default"
      

      Has anyone else run into this? Should I uninstall and reinstall Alexapi? This seems related to the steps I went through to enable the recording device…

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil
        last edited by

        did u edit this with an editor that left line ends and carriage returns (like windows editor?)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          StrIIker @sdetweil
          last edited by

          @sdetweil said in AlexaPi Issue:

          did u edit this with an editor that left line ends and carriage returns (like windows editor?)

          No, I do this from the command line using vim…

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil
            last edited by

            @striiker said in AlexaPi Issue:

            expected , but found %r

            ok, this error “expected , but found %r” kind of indicates a carriage return

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Offline
              StrIIker
              last edited by

              Well, I determined the cause of the issue I think. I decided to remove everything prior to the line with “playback_handler” and pasted it from the template. I then manually entered the values under sound but this time, included two leading spaces to match the original config under sound where "input_device: “” had the spaces…
              My config now looks like:

              # See https://github.com/alexa-pi/AlexaPi/wiki/Audio-setup-&-debugging
              # to get a better idea of how to set things in here
              
              # Level of log output
              # default: INFO
              # set to DEBUG for verbose logging
              logging: INFO
              
              sound:
                # Name of your microphone device in PortAudio
                # leave empty for default
                input_device: "pulse"
                output: "pulse"
                output_device: ""
              
                playback_handler: "vlc"
              

              Now I have new issues related to ALSA I think as there are errors related to this in the logs.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy