Skip to content

"RuntimeError: no running event loop" cannot run any example code #57

@Celppu

Description

@Celppu

Trying any example codes that uses swift.

Installed via pip with roboticstoolbox
So far I have tested python versions 3.10 and 3.13
On windows and linux.

error:
Exception in thread Thread-3 (SwiftSocket): Traceback (most recent call last): File "c:\Users\mee\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "c:\Users\mee\AppData\Local\Programs\Python\Python312\Lib\site-packages\ipykernel\ipkernel.py", line 766, in run_closure _threading_Thread_run(self) File "c:\Users\mee\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "c:\Users\mee\AppData\Local\Programs\Python\Python312\Lib\site-packages\swift\SwiftRoute.py", line 296, in __init__ start_server = websockets.serve(self.serve, "localhost", port) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\mee\AppData\Local\Programs\Python\Python312\Lib\site-packages\websockets\asyncio\server.py", line 737, in __init__ self.server = Server( ^^^^^^^ File "c:\Users\mee\AppData\Local\Programs\Python\Python312\Lib\site-packages\websockets\asyncio\server.py", line 281, in __init__ self.loop = asyncio.get_running_loop() ^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: no running event loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions