module 'agent.tools' has no attribute 'CodeExecParam' #9190
Replies: 2 comments
-
|
Hi @bensonleunglcy! I'm Dosu and I’m helping the ragflow team. The error happens because CodeExecParam is defined in agent.tools.code_exec, not directly in agent.tools. So, trying to access agent.tools.CodeExecParam will raise an AttributeError. You should import it like this: from agent.tools.code_exec import CodeExecParamThere have also been recent changes in RAGFlow where per-tool parameter classes (like AnswerParam and likely CodeExecParam) are being phased out in favor of a new structure using ToolParamBase and component parameter classes. If you’re following older examples or docs, you may need to update your code to match the new structure. Similar issues have been reported for other parameters, so double-check your version and usage if you run into more errors. More details are in these related discussions: issue 9141, code_exec implementation. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
this kind of attribute error is often just the symptom — the deeper issue is usually a version mismatch where the semantic structure of the framework changed, but the reference logic didn’t get updated in sync. we’ve seen this in many agent toolkits and RAG pipelines — especially when per-component params (like CodeExecParam) are reorganized across submodules. we’ve been building some diagnostics around version-safe semantic routing for agent modules — MIT licensed, and backed by the tesseract.js author. happy to share if you’re interested — just let me know. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
when use code_exec ,there is a error: module 'agent.tools' has no attribute 'CodeExecParam'
Beta Was this translation helpful? Give feedback.
All reactions