kercre123 / wire-pod

Free, fully-featured server software for the Anki Vector robot.
MIT License
435 stars 148 forks source link

custom intent with python SDK not working [BUG] #318

Open Hamlet3000 opened 5 months ago

Hamlet3000 commented 5 months ago

Describe the bug I have completely reinstalled wirepod with v1.1.18 using the linux installer on a new Raspberry Pi. The new onboarding process works great! Many thanks for that!

I also installed the wirepod-vector-python-sdk and copied my old python scripts back to the pi.

When I start them on the console with python3 they work fine. When I start them via a cusom intent via wire-pod I get the following error message:

Apr 23 20:14:12 escapepod wire-pod[1035]: (Bot 0dd1d1d6) End of speech detected.
Apr 23 20:14:12 escapepod wire-pod[1035]: Bot 0dd1d1d6 Transcribed text: test
Apr 23 20:14:12 escapepod wire-pod[1035]: Bot 0dd1d1d6 Custom Intent Matched: test - test - intent_greeting_hello
Apr 23 20:14:12 escapepod wire-pod[1035]: Bot 0dd1d1d6 Executing: /bin/python3 /home/pi/VectorApps/01_hello_world.py --serial 0dd1d1d6
Apr 23 20:14:13 escapepod wire-pod[1035]: exit status 1: 20:14:13.374     connection.Connection    INFO  Connecting to 192.168.0.51:443 for Vector-B7C8 using /root/.anki_vector/Vector-B7C8-0dd1d1d6.cert
Apr 23 20:14:13 escapepod wire-pod[1035]: Traceback (most recent call last):
Apr 23 20:14:13 escapepod wire-pod[1035]:   File "/home/pi/VectorApps/01_hello_world.py", line 50, in <module>
Apr 23 20:14:13 escapepod wire-pod[1035]:     main()
Apr 23 20:14:13 escapepod wire-pod[1035]:   File "/home/pi/VectorApps/01_hello_world.py", line 27, in main
Apr 23 20:14:13 escapepod wire-pod[1035]:     with anki_vector.Robot(args.serial, cache_animation_lists=False) as robot:
Apr 23 20:14:13 escapepod wire-pod[1035]:   File "/usr/lib/python3/dist-packages/anki_vector/robot.py", line 755, in __enter__
Apr 23 20:14:13 escapepod wire-pod[1035]:     self.connect(self.behavior_activation_timeout)
Apr 23 20:14:13 escapepod wire-pod[1035]:   File "/usr/lib/python3/dist-packages/anki_vector/robot.py", line 643, in connect
Apr 23 20:14:13 escapepod wire-pod[1035]:     self.conn.connect(timeout=timeout)
Apr 23 20:14:13 escapepod wire-pod[1035]:   File "/usr/lib/python3/dist-packages/anki_vector/connection.py", line 481, in connect
Apr 23 20:14:13 escapepod wire-pod[1035]:     raise e
Apr 23 20:14:13 escapepod wire-pod[1035]: anki_vector.exceptions.VectorUnauthenticatedException: StatusCode.UNAUTHENTICATED: Received http2 header with status: 401
Apr 23 20:14:13 escapepod wire-pod[1035]: Failed to authenticate request.
Apr 23 20:14:13 escapepod wire-pod[1035]: Bot 0dd1d1d6 Custom Intent Exec Output:
Apr 23 20:14:13 escapepod wire-pod[1035]: Bot 0dd1d1d6 Intent Sent: intent_greeting_hello
Apr 23 20:14:13 escapepod wire-pod[1035]: No Parameters Sent
Apr 23 20:14:13 escapepod wire-pod[1035]: This is a custom intent or plugin!
Apr 23 20:14:13 escapepod wire-pod[1035]: Bot 0dd1d1d6 request served.

To Reproduce

  1. create new custom intent which calls a python SDK script like Screenshot 2024-04-23 201708
  2. call custom intent

Expected behavior SDK script should be executed

Device you are running wire-pod on (please complete the following information):

Additional context console command python3 01_hello_world.py --serial 0dd1d1d6 runs the script like expected

Hamlet3000 commented 4 months ago

hello, recently i get the same error message now when i start a python script via the console. This has always worked before.

I am now on wire-pod version v1.1.22 with the wirepod-armhf package

python3 01_hello_world.py --serial 0dd1d1d6
09:26:41.082     connection.Connection    INFO  Connecting to 192.168.0.51:443 for Vector-B7C8 using /home/pi/.anki_vector/Vector-B7C8-0dd1d1d6.cert
Traceback (most recent call last):
  File "/home/pi/VectorApps/01_hello_world.py", line 50, in <module>
    main()
  File "/home/pi/VectorApps/01_hello_world.py", line 27, in main
    with anki_vector.Robot(args.serial, cache_animation_lists=False) as robot:
  File "/home/pi/.local/lib/python3.11/site-packages/anki_vector/robot.py", line 755, in __enter__
    self.connect(self.behavior_activation_timeout)
  File "/home/pi/.local/lib/python3.11/site-packages/anki_vector/robot.py", line 643, in connect
    self.conn.connect(timeout=timeout)
  File "/home/pi/.local/lib/python3.11/site-packages/anki_vector/connection.py", line 481, in connect
    raise e
anki_vector.exceptions.VectorUnauthenticatedException: StatusCode.UNAUTHENTICATED: Received http2 header with status: 401

Failed to authenticate request.

have any paths changed here? /home/pi/.anki_vector with the certificates is still there anyway