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

Trying to call "say_text" twice error #45

Open
edeneliel opened this issue Sep 29, 2020 · 0 comments
Open

Trying to call "say_text" twice error #45

edeneliel opened this issue Sep 29, 2020 · 0 comments

Comments

@edeneliel
Copy link

Let's say i want to make my vector say "Sorry" every time he's not able to get what i said
So i wrote this code:

def on_wake_word(robot, event_type, event):
    if "wake_word_end" in str(event) and event.wake_word_end.intent_json == '':
        try:
            robot.conn.request_control()
            robot.behavior.say_text("Sorry i couldn't help")
        finally:
            robot.conn.release_control()


if __name__ == "__main__":

    with Robot() as vector_robot:
        vector_robot.events.subscribe(on_wake_word, Events.wake_word)

        while True:
            sleep(1)

the function does called twice if i try to trigger vector, the first time vector reacts as he should, and say the text,
the second time though, he gets there and throw an error:

<_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.INTERNAL
	details = "Failed to say text"
	debug_error_string = "{"created":"@1601351205.816768000","description":"Error received from peer ipv4:X.X.X.X:443","file":"src/core/lib/surface/call.cc","file_line":1062,"grpc_message":"Failed to say text","grpc_status":13}"
>

expected:
That vector will work multiple times with the same call,

Thanks ahead, Eden

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

1 participant