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

_queue.Empty bug #160

Open
twinsant opened this issue Sep 13, 2024 · 1 comment
Open

_queue.Empty bug #160

twinsant opened this issue Sep 13, 2024 · 1 comment

Comments

@twinsant
Copy link

测试程序:

https://gist.github.com/twinsant/e99141a75f8fce8be2ea88c5d2f675c2

如果我将本地Agently仓库路径加入sys.path

def use_local_agently():
    sys.path.append('/Users/ant/GitHub/Agently')

会出现下面的bug

(Agently) ➜  agents3 git:(main) ✗ python agently_tool.py
/Users/ant/GitHub/Agently/Agently/__init__.py
Exception in thread Thread-2 (start_in_theard):
Traceback (most recent call last):
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/ant/GitHub/Agently/Agently/Request/Request.py", line 150, in start_in_theard
    reply = asyncio.get_event_loop().run_until_complete(self.get_result_async(request_type))
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/ant/GitHub/Agently/Agently/Request/Request.py", line 117, in get_result_async
    event_generator = await self.get_event_generator(request_type)
  File "/Users/ant/GitHub/Agently/Agently/Request/Request.py", line 88, in get_event_generator
    request_plugin_instance = self.plugin_manager.get("request", model_name)(request = self)
  File "/Users/ant/GitHub/Agently/Agently/utils/PluginManager.py", line 45, in get
    raise Exception(f"[Plugin Manager] Plugin '{ plugin_name }' is not in the plugins runtime_ctx of module '{ module_name }'.")
Exception: [Plugin Manager] Plugin 'Claude' is not in the plugins runtime_ctx of module 'request'.
Exception in thread Thread-1 (start_in_theard):
Traceback (most recent call last):
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/ant/GitHub/Agently/Agently/Agent/Agent.py", line 204, in start_in_theard
    reply = asyncio.get_event_loop().run_until_complete(self.start_async(request_type))
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/ant/GitHub/Agently/Agently/Agent/Agent.py", line 152, in start_async
    await call_prefix_funcs(self.agent_request_prefix[agent_component_name])      
  File "/Users/ant/GitHub/Agently/Agently/Agent/Agent.py", line 130, in call_prefix_funcs
    prefix_data = await prefix_func() if asyncio.iscoroutinefunction(prefix_func) else prefix_func()
  File "/Users/ant/GitHub/Agently/Agently/plugins/agent_component/Tool.py", line 150, in _prefix
    tool_results = self.call_plan_func(self)
  File "/Users/ant/GitHub/Agently/Agently/plugins/agent_component/Tool.py", line 86, in call_plan_func
    .start()
  File "/Users/ant/GitHub/Agently/Agently/Request/Request.py", line 159, in start
    return self.get_result(request_type)
  File "/Users/ant/GitHub/Agently/Agently/Request/Request.py", line 155, in get_result
    reply = reply_queue.get_nowait()
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/queue.py", line 199, in get_nowait
    return self.get(block=False)
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/queue.py", line 168, in get
    raise Empty
_queue.Empty
Traceback (most recent call last):
  File "/Users/ant/projects/agents3/agently_tool.py", line 44, in <module>
    .start()
  File "/Users/ant/GitHub/Agently/Agently/Agent/Agent.py", line 209, in start
    reply = reply_queue.get_nowait()
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/queue.py", line 199, in get_nowait
    return self.get(block=False)
  File "/Users/ant/miniconda3/envs/Agently/lib/python3.10/queue.py", line 168, in get
    raise Empty
_queue.Empty
@Maplemx
Copy link
Owner

Maplemx commented Sep 17, 2024

raise Exception(f"[Plugin Manager] Plugin '{ plugin_name }' is not in the plugins runtime_ctx of module '{ module_name }'.")
Exception: [Plugin Manager] Plugin 'Claude' is not in the plugins runtime_ctx of module 'request'.

Please check file /<your_package_path>/plugins/request/Claude.py remains intact or not.

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

2 participants