commaai / bodyjim

A gymnasium environment for the comma body
MIT License
32 stars 2 forks source link

Latest bodyjim error on Python 3.8 #13

Closed srik901 closed 4 months ago

srik901 commented 4 months ago

Trying to run bodyjim examples specifically python3 random_walk.py 192.168.68.83

and getting an error RuntimeError: There is no current event loop in thread 'MainThread'.

I did a git clone and installed using pip3 install . I am in the joystick mode and none of the examples run

The entire error is Traceback (most recent call last): File "random_walk.py", line 32, in run_random_walk(args.body_ip, args.cameras) File "random_walk.py", line 11, in run_random_walk env.reset() File "/home/srik/.local/lib/python3.8/site-packages/bodyjim/env.py", line 108, in reset self._initialize_data_stream() File "/home/srik/.local/lib/python3.8/site-packages/bodyjim/env.py", line 61, in _initialize_data_stream self._data_stream = DataStreamSession(self._client, self._cameras, self._services) File "/home/srik/.local/lib/python3.8/site-packages/bodyjim/data_stream.py", line 52, in init self._stream = builder.stream() File "/home/srik/.local/lib/python3.8/site-packages/teleoprtc/builder.py", line 39, in stream return WebRTCOfferStream( File "/home/srik/.local/lib/python3.8/site-packages/teleoprtc/stream.py", line 228, in init super().init(*args, **kwargs) File "/home/srik/.local/lib/python3.8/site-packages/teleoprtc/stream.py", line 45, in init self.incoming_media_ready_event = asyncio.Event() File "/usr/lib/python3.8/asyncio/locks.py", line 260, in init self._loop = events.get_event_loop() File "/usr/lib/python3.8/asyncio/events.py", line 639, in get_event_loop raise RuntimeError('There is no current event loop in thread %r.' RuntimeError: There is no current event loop in thread 'MainThread'.

srik901 commented 4 months ago

This is an issue on python 3.8. It is solved by using python 3.11