*** ModuleNotFoundError: No module named 'dataiku.langchain'

Open
#336 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start in dataikuapi.dss.langchain.tool, especially the import of dataiku.langchain.dku_tracer, and reproduce the failure with DSSAgentTool.as_langchain_structured_tool(). Trace whether the required module is packaged or imported from the wrong dependency; done means the method runs without ModuleNotFoundError for an installed dataiku and dataikuapi setup.

Written by the indexing model from the issue text.

Description

dataikuapi.dss.langchain.tool tries to import dataiku

from dataiku.langchain.dku_tracer import dku_span_builder_for_callbacks

I have both dataiku and datikuapi installed and calling tool.as_langchain_structured_tool() doesn't work with either

(Pdb) tool
<dataikuapi.dss.agent_tool.DSSAgentTool object at 0x7f25f62f58e0>
(Pdb) t = tool.as_langchain_structured_tool()
*** ModuleNotFoundError: No module named 'dataiku.langchain'
(Pdb) from dataiku import langchain
*** ImportError: cannot import name 'langchain' from 'dataiku' (.venv/lib/python3.12/site-packages/dataiku/__init__.py)
(Pdb) tool
<dataikuapi.dss.agent_tool.DSSAgentTool object at 0x7f25f62f58e0>
(Pdb) tool.as_langchain_structured_tool()
*** ModuleNotFoundError: No module named 'dataiku.langchain'
Dominant language
Python
Stars
44
Forks
29
Avg merge
3h 34m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dataiku/dataiku-api-client-python

All issues in dataiku/dataiku-api-client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.