NeMo-Guardrails icon indicating copy to clipboard operation
NeMo-Guardrails copied to clipboard

Event loop is closed

Open JarvisYan0802 opened this issue 2 years ago • 2 comments

I've run the demo py file. It can return the message I want correctly, but always raises a RuntimeError: "Event loop is closed". How dose it happen and what can I do?

JarvisYan0802 avatar Apr 26 '23 05:04 JarvisYan0802

Hi @JarvisYan0802 ! Can you provide more details on this? I am not able to reproduce the error. Did you change anything to the demo.py file? If not, can you share more details about the environment (i.e. python version, venv or not, OS)? Thanks!

drazvan avatar Apr 26 '23 20:04 drazvan

Happening for me, too. errors.txt

I was walking through the topical_rails example. It seems to happen randomly. I modified the script slightly by putting the rails.generate() function in a try/except and a while loop. Even though the exception occurred, it still generates output. main_file.txt

armstrongsam25 avatar May 09 '23 16:05 armstrongsam25

Thanks for reporting this @armstrongsam25! We need to investigate further as I can't reproduce yet. We'll keep you posted. What OS/python version are you using?

drazvan avatar May 09 '23 19:05 drazvan

OS: Win11 Enterprise, Version 21H2, Build 22000.1880 Python: 3.8.10

armstrongsam25 avatar May 10 '23 14:05 armstrongsam25