Bug: Error building Component Astra DB Graph
Bug Description
Astra DB Graph component is not working in Langflow (both running locally & the browser application). I've verified I have the packages installed that it is referencing and that they are up to date (as far as I can tell). I even tried force reinstalling all packages (langflow, langchain, langchain_astradb, etc.).
From doing some digging and modifying the component code to print out the errors (see below), it looks like the component is trying to call AstraDBGraphVectorStore. However, from digging through the package itself + AstraDB documentation, I can't find reference to this anywhere within the langchain_astradb package. This could be a red herring, given I'm a nooby programmer, but only thing I could think of.
Error building Component Astra DB Graph:
Could not import langchain Astra DB integration package. Please install it with `pip install langchain-astradb`.
Traceback (most recent call last):
File "<string>", line 227, in build_vector_store
ImportError: cannot import name 'AstraDBGraphVectorStore' from 'langchain_astradb' (/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langchain_astradb/__init__.py). Did you mean: 'AstraDBVectorStore'?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langflow/graph/vertex/base.py", line 635, in _build_results
result = await initialize.loading.get_instance_results(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langflow/interface/initialize/loading.py", line 72, in get_instance_results
return await build_component(params=custom_params, custom_component=custom_component)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langflow/interface/initialize/loading.py", line 152, in build_component
build_results, artifacts = await custom_component.build_results()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 1064, in build_results
return await self._build_with_tracing()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 1046, in _build_with_tracing
results, artifacts = await self._build_results()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 1091, in _build_results
result = await self._get_output_result(output)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 1166, in _get_output_result
result = await method() if inspect.iscoroutinefunction(method) else await asyncio.to_thread(method)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samuelharper/.local/share/uv/python/cpython-3.12.11-macos-aarch64-none/lib/python3.12/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samuelharper/.local/share/uv/python/cpython-3.12.11-macos-aarch64-none/lib/python3.12/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 333, in search_documents
File "/Users/samuelharper/Documents/Python/.venv/lib/python3.12/site-packages/langflow/base/vectorstores/model.py", line 33, in check_cached
result = f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 234, in build_vector_store
ImportError: Could not import langchain Astra DB integration package. Please install it with `pip install langchain-astradb`.
Reproduction
Steps to reproduce:
- Add a Astra DB Graph component
- Add tokens, API endpoint, required parameters
- Run flow
- See error
Expected behavior
Astra DB Graph should be able to run and shouldn't throw an error.
Who can help?
No response
Operating System
Mac OS 15.6.1
Langflow Version
1.6
Python Version
3.12
Screenshot
Flow File
No response
+1 on this issue! Any ideas anybody?
Hi,
I'm using version 1.6.0, and I tried it — it works perfectly on my side.
So, the problem might be related to your environment. Could you please share how you installed Langflow? (e.g., Docker, UV run, or Langflow Desktop)
I suspect that some packages might have been installed outside of Langflow’s environment.
+1 I'm experiencing this to after running uv pip install langflow -U October 22nd. Version 1.6.5
I also tried installing the package as per the instructions. Pip reports that 1 package was audited. So it is installed.
It was working on the previous version prior to the update today.