Giter Club home page Giter Club logo

Comments (8)

DeadEnded avatar DeadEnded commented on June 4, 2024 1

So I have to say... I am VERY excited... I think I found the problem and have created a pull request for the solution.
After a LOT of digging to understand where everything is (total noob) I was able to compare the intent handler with the wav file directory fields. I found the line of code that expands the environmental variables - and it wasn't present for the intent handler.

I added it in my container and after a restart it appears to be working.
This was just a 1 line change, but I am very happy to have been able to troubleshoot it and find the solution.
I use a lot of open source software, so I am always trying to contribute.

Here is the pull request - not sure what the requirements are... I created it against Master which I expect is not the "correct" way... so I might have to re-create it for one of the tags... unless the maintainers allow it because it is a single line addition - so very little to review.
rhasspy/rhasspy-supervisor#4

Cheers!
DeadEnd

from rhasspy.

synesthesiam avatar synesthesiam commented on June 4, 2024

Thanks, I'll take a look. I haven't tested the local command much, and I may have broken something in the last few months.

from rhasspy.

DeadEnded avatar DeadEnded commented on June 4, 2024

It appears I am having the same issue.
Followed the docs, using the example handler.py and it still doesn't work.

Happy to do any testing I can - but I'm pretty inexperienced, so might need a bit of detail 😄 .

DeadEnd

from rhasspy.

DeadEnded avatar DeadEnded commented on June 4, 2024

I was digging in the code trying to understand more, and I think I found something but don't know if it would cause a problem...

In the intent handler, there is a reference to satellites... but at least in the GUI there is no way to set them... I wasn't sure if this would cause it to error when trying to use a local intent handler.

rhasspy-supervisor/rhasspysupervisor/hasspysupervisor/init.py
Lines 140-145

    # Intent Handling
    handle_system = profile.get("handle.system", "dummy")
    if handle_system not in {"dummy", "hermes"}:
        satellite_site_ids = str(profile.get("handle.satellite_site_ids", "")).split(
            ","
        )

Since I'm pretty dev dumb... would this cause an error if the value doesn't exist and doesn't have a fallback default?

from rhasspy.

DeadEnded avatar DeadEnded commented on June 4, 2024

Something more interesting... I watched the docker logs... and was getting this error:

[ERROR:2020-08-04 17:02:10,967] rhasspyremote_http_hermes: handle_intent
Traceback (most recent call last):
  File "/usr/lib/rhasspy/rhasspy-remote-http-hermes/rhasspyremote_http_hermes/__init__.py", line 798, in handle_intent
    stderr=asyncio.subprocess.PIPE,
  File "/usr/lib/python3.7/asyncio/subprocess.py", line 217, in create_subprocess_exec
    stderr=stderr, **kwds)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 1529, in subprocess_exec
    bufsize, **kwargs)
  File "/usr/lib/python3.7/asyncio/unix_events.py", line 190, in _make_subprocess_transport
    **kwargs)
  File "/usr/lib/python3.7/asyncio/base_subprocess.py", line 37, in __init__
    stderr=stderr, bufsize=bufsize, **kwargs)
  File "/usr/lib/python3.7/asyncio/unix_events.py", line 775, in _start
    universal_newlines=False, bufsize=bufsize, **kwargs)
  File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '${RHASSPY_PROFILE_DIR}/handler.py': '${RHASSPY_PROFILE_DIR}/handler.py'

So I didn't use the reference, and instead typed out /profiles/en/handler.py
and now IT WORKS!
So it appears there is an issue with using the variable paths with the intent handler.

@Daenara can you replace your ${RHASSPY_PROFILE_DIR} with an absolutely path (/profiles/en in the container). See that fixes it for you as well!

DeadEnd

from rhasspy.

Daenara avatar Daenara commented on June 4, 2024

That was it, it works now. I never looked at the full log, just the part that it showed in the webgui so I never caught that. Thanks for figuring that out @DeadEnded

from rhasspy.

koenvervloesem avatar koenvervloesem commented on June 4, 2024

Thanks for your valuable contribution, @DeadEnded! I merged rhasspy/rhasspy-supervisor#4, always nice to get a one-line fix for a long-standing problem :-)

from rhasspy.

jnoelvictorino avatar jnoelvictorino commented on June 4, 2024

May I ask what if I added a Python library in the custom command? I am getting a module not found when I import the library.

from rhasspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.