-
Notifications
You must be signed in to change notification settings - Fork 38
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
RuntimeError: There is no current event loop in thread 'Thread-1 (thread_inner)'. #1504
Comments
Update: After some searching, I came across the following PR that fixes a similar issue RuntimeError on nest_asyncio.apply() (There is no current event loop in thread 'Thread-3' ) by adding the following:
Indeed, putting this code snippet in the same file that contains the invocation of the Modal function fixed the problem! Thank you @eugeniashurko ! |
Hey @alijaafar21 just so I understand — is |
Hello, I am not directly using I have created the following repo which will allow reproducing the error reported above by executing
In app.py, I am trying to lookup a function and then invoke it. Kindly note that if the |
Thank you! I suspect that the issue is with the code underlying the |
Kindly find the code of the function |
Hello,
While attempting to invoke a deployed Modal function in a Chainlit application I faced the following error:
This is how I am getting and invoking the function:
Kindly note that the same error was first happening when getting the function through
modal.Function.lookup( )
but using
modal.Function.from_name( )
made it work.But now the
.remote( )
is causing the same issue.Here's the full stack trace:
3.12.2
0.61.31
The text was updated successfully, but these errors were encountered: