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

Compatibility with Python 3.10 #39

Open
nathansegers opened this issue Nov 16, 2021 · 2 comments
Open

Compatibility with Python 3.10 #39

nathansegers opened this issue Nov 16, 2021 · 2 comments

Comments

@nathansegers
Copy link

If the reachy-sdk Python package is installed into a fresh Conda environment with Python 3.10, we get this error:

TypeError: As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary

The whole stack trace is:

File "C:\Users\natha\.conda\envs\reachy-sdk\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\site-packages\reachy_sdk\reachy_sdk.py", line 176, in _start_sync_in_bg
    loop.run_until_complete(self._sync_loop())
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\asyncio\base_events.py", line 641, in run_until_complete
    return future.result()
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\site-packages\reachy_sdk\reachy_sdk.py", line 231, in _sync_loop
    await asyncio.gather(
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\site-packages\reachy_sdk\reachy_sdk.py", line 220, in _stream_commands_loop
    await joint_stub.StreamJointsCommands(command_poll())
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\site-packages\grpc\aio\_channel.py", line 196, in __call__
    call = StreamUnaryCall(request_iterator, deadline, metadata,
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\site-packages\grpc\aio\_call.py", line 593, in __init__
    self._init_stream_request_mixin(request_iterator)
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\site-packages\grpc\aio\_call.py", line 374, in _init_stream_request_mixin
    self._metadata_sent = asyncio.Event(loop=self._loop)
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\asyncio\locks.py", line 167, in __init__
    super().__init__(loop=loop)
  File "C:\Users\natha\.conda\envs\reachy-sdk\lib\asyncio\mixins.py", line 17, in __init__
    raise TypeError(

So it seems this has to do with asyncio.

@pierre-rouanet
Copy link
Member

Thanks for the feedback @nathansegers, I'll try to have a look at it soon.

@pierre-rouanet
Copy link
Member

Seems related to grpc/grpc#27888

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

2 participants