Skip to content

Not compatible with Python 3.14 - Asyncio Error #31

@jdunn596

Description

@jdunn596

Issue

Attempting to run the bot using python 3.14.x results in an Asyncio RuntimeError:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Jimmy\Documents\Projects\rtgg-randobot\.venv\Scripts\randobot.exe\__main__.py", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "C:\Users\Jimmy\Documents\Projects\rtgg-randobot\randobot\__init__.py", line 39, in main
    inst = RandoBot(
        ootr_api_key=args.ootr_api_key,
    ...<3 lines>...
        logger=logger,
    )
  File "C:\Users\Jimmy\Documents\Projects\rtgg-randobot\randobot\bot.py", line 13, in __init__
    super().__init__(*args, **kwargs)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "C:\Users\Jimmy\Documents\Projects\rtgg-randobot\.venv\Lib\site-packages\racetime_bot\bot.py", line 45, in __init__
    self.loop = asyncio.get_event_loop()
                ~~~~~~~~~~~~~~~~~~~~~~^^
  File "C:\Users\Jimmy\scoop\apps\python\current\Lib\asyncio\events.py", line 715, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.

This seems to be an issue with the included racetime_bot package, not RandoBot itself.

Workaround:

Revert to 3.13.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions