Skip to content

PythonMonkey cannot find a running Python event-loop to make asynchronous calls. #469

Open
@arvindavoudi

Description

@arvindavoudi

Issue type

Bug

How did you install PythonMonkey?

Installed from pip

OS platform and distribution

MacOS 15.1

Python version (python --version)

3.11.9

PythonMonkey version (pip show pythonmonkey)

1.1.0

Bug Description

Hi,
I attempted to load the lightstreamer-client JavaScript library in Python using PythonMonkey as shown below:

import pythonmonkey as pm
lsc = pm.require("lightstreamer-client")

However, I encountered the following error:

Traceback (most recent call last):
  File ".../test.py", line 4, in <module>
    lsc = pm.require("lightstreamer-client")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pythonmonkey/require.py", line 431, in require
    return createRequire(filename)(moduleIdentifier)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: PythonMonkey cannot find a running Python event-loop to make asynchronous calls.

Could you provide guidance on how to resolve this issue?
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions