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

List animations frequently causes a timeout #51

Open
TylerGubala opened this issue Aug 30, 2022 · 3 comments
Open

List animations frequently causes a timeout #51

TylerGubala opened this issue Aug 30, 2022 · 3 comments

Comments

@TylerGubala
Copy link

With the majority of the examples that I run from this repo, I get the following error:

Exception has occurred: VectorTimeoutException
StatusCode.DEADLINE_EXCEEDED: ListAnimations request timed out

Message took too long to complete.

  File "D:\Code\vector-python-sdk\anki_vector\connection.py", line 749, in log_handler
    result = await func(*args, **kwargs)
  File "D:\Code\vector-python-sdk\anki_vector\animation.py", line 168, in load_animation_list
    return await self._load_animation_list()
  File "D:\Code\vector-python-sdk\anki_vector\animation.py", line 134, in _load_animation_list
    result = await self.grpc_interface.ListAnimations(req)

The above exception was the direct cause of the following exception:

  File "D:\Code\vector-python-sdk\anki_vector\connection.py", line 751, in log_handler
    raise connection_error(rpc_error) from rpc_error
  File "D:\Code\vector-python-sdk\anki_vector\connection.py", line 806, in result
    return future.result()
  File "D:\Code\vector-python-sdk\anki_vector\robot.py", line 663, in connect
    anim_request = self._anim.load_animation_list()
  File "D:\Code\vector-python-sdk\anki_vector\robot.py", line 742, in __enter__
    self.connect(self.behavior_activation_timeout)
  File "D:\Code\vector-python-sdk\examples\tutorials\01_hello_world.py", line 27, in main
    with anki_vector.Robot(args.serial) as robot:
  File "D:\Code\vector-python-sdk\examples\tutorials\01_hello_world.py", line 33, in <module>
    main()

Any idea what is causing this?

@thesmatt
Copy link

It is SDK code no longer supported by most recent python. Revert to 3.7.5 to prevent all these errors.

@sam1am
Copy link

sam1am commented Feb 28, 2023

Even with python 3.7.5 I get this same error.

@ninp0
Copy link

ninp0 commented Mar 20, 2023

Somewhat of a hack but changing the behavior_activation_timeout value and setting cache_animation_lists=False at startup seems to eliminate the issue for me:

    robot = anki_vector.Robot(
      show_viewer=True,
      show_3d_viewer=True,
      enable_face_detection=True,
      enable_custom_object_detection=True,
      enable_nav_map_feed=True,
      behavior_activation_timeout=30.0,
      cache_animation_lists= False
    )
$ python --version
Python 3.11.2

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

4 participants