Skip to content
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

Error executing memory callback for task X #307

Open
azulaaGy opened this issue Jan 17, 2025 · 0 comments
Open

Error executing memory callback for task X #307

azulaaGy opened this issue Jan 17, 2025 · 0 comments

Comments

@azulaaGy
Copy link

i'm getting this error

[14:05:06] ERROR    [14:05:06] **agents.py:633 ERROR Error executing memory callback for task 0: There is no current event loop in thread      agents.py:633**
                    'ScriptRunner.scriptThread'.
C:\Users\david\AppData\Local\Programs\Python\Python313\Lib\site-packages\rich\text.py:144: ResourceWarning: unclosed database in <sqlite3.Connection object at 0x00000265F93F84F0>
  def __init__(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
           ERROR    [14:05:06] agents.py:634 ERROR There is no current event loop in thread 'ScriptRunner.scriptThread'.                     agents.py:634
                    ╭───────────────────────────────────────── Traceback (most recent call last)───────────────╮ 
                    │ C:\Users\david\AppData\Local\Programs\Python\Python313\Lib\site-packages\praisonaiagents\agents\agents.py:626 inrun_task                                                                                                                                                                                        
                    │                                                                                                                                                                                                       
                    │   623 │   │   │   │   │   task.status = "completed"624 │   │   │   │   │   # Run execute_callback for memory operations                                                                                      625 │   │   │   │   │   try:                                                                                                                                                            
                    │ ❱ 626 │   │   │   │   │   │   if asyncio.get_event_loop().is_running():                                                                                                      
                    │   627 │   │   │   │   │   │   │   asyncio.create_task(task.execute_callback(task_output))                                                               
                    │   628 │   │   │   │   │   │   else:                                                                                                                                                     
                    │   629 │   │   │   │   │   │   │   loop = asyncio.new_event_loop()                                                                                                  
                    │                                                                                                                                                                                                      
                    │ C:\Users\david\AppData\Local\Programs\Python\Python313\Lib\asyncio\events.py:716 in get_event_loop                            
                    │                                                                                                                                                                                                      
                    │   713 │   │   │   self.set_event_loop(self.new_event_loop())                                                                                                          
                    │   714 │   │                                                                                                                                                                                     
                    │   715 │   │   if self._local._loop is None:                                                                                                                                       
                    │ ❱ 716 │   │   │   raise RuntimeError('There is no current event loop in thread %r.'717 │   │   │   │   │   │   │      % threading.current_thread().name)                                                                                           
                    │   718 │   │                                                                                                                                                                                     
                    │   719 │   │   return self._local._loop                                                                                                                                              
                    ╰───────────────────────────────────────────────────────────────────────────╯ 
                    RuntimeError: There is no current event loop in thread 'ScriptRunner.scriptThread'.

for python 3.13. i tried running the same code with python 3.10 and the error is the same except i'm also getting this warning despite praisonaiagents[memory] already being installed:

WARNING  [12:47:21] memory.py:18 WARNING To use memory features, please run: pip install "praisonaiagents[memory]"    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant