langflow-ai / langflow

⛓️ Langflow is a visual framework for building multi-agent and RAG applications. It's open-source, Python-powered, fully customizable, LLM and vector store agnostic.
http://www.langflow.org
MIT License
18.48k stars 2.77k forks source link

ValueError: Error building vertex Astra DB Search: {"errors":[{"message":"Unknown namespace default_keyspace, you must create it first.","errorCode":"NAMESPACE_DOES_NOT_EXIST"}]} #1770

Open msmygit opened 1 month ago

msmygit commented 1 month ago

Describe the bug Running Langflow v1.0.0a24 version locally on macOS Sonoma 14.4.1 and hitting the below error.

ValueError: Error building vertex Astra DB Search: {"errors":[{"message":"Unknown namespace default_keyspace, you must create it                                                        
                             first.","errorCode":"NAMESPACE_DOES_NOT_EXIST"}]}
image

See the attached file for detailed console error. Follwed the following resources,

langflow-rag-with-astra-a24-error-20240423.txt

Browser and Version

To Reproduce Steps to reproduce the behavior:

  1. Start following https://pre-release.langflow.org/guides/rag-with-astradb and then you hit this error at the below step,
  2. image
  3. Validated Astra DB console and can ensure that default_keyspace namespace is also available. The token is of type Organization Administrator permission (https://docs.datastax.com/en/astra/astra-db-vector/administration/manage-database-access.html#organization-administrator-role) too. image

Screenshots added all applicable details above.

Additional context I'm only using the default Open AI embedding and unsure I'm receiving an error related to Google Vertex AI here. Thank you in advance!

msmygit commented 1 month ago

Error with langflow-1.0.0a27 version is attached below for reference. v1.0.0a27-rag-with-astradb-error-20240429.txt

ogabrielluiz commented 1 month ago

Hey @msmygit

Thank you!

Looking into it now.

ogabrielluiz commented 1 month ago

Could you try setting the namespace in the Advanced parameters of the component?

msmygit commented 1 month ago

Thank you @ogabrielluiz . FWIW, I also have ASTRA_DB_NAMESPACE=default_keyspace on the env file which didn't make a difference, but let me try the advanced section route.

msmygit commented 1 month ago

No luck,

image
ogabrielluiz commented 1 month ago

Could it be that you are using the wrong credentials?

I just tested it here and it is working.

msmygit commented 1 month ago

I tried with the Organization Administrator role and still the same result. Is there a place where I need to provide the secure connect bundle?

image

FWIW, in order to validate the token permissions, I also tried using it via a standalone CQLSH and it works fine and I can see the presence of default_keyspace:

cqlsh-astra-vector % /Users/username/Downloads/cqlsh-astra-vector/bin/cqlsh -u token --disable-history -p 'AstraCS:MASKED' -b /Users/username/Downloads/secure-connect-vector-ec62fc37.zip 
Connected to cndb at 127.0.0.1:9042.
[cqlsh 6.8.0 | Cassandra 4.0.0.6816 | CQL spec 3.4.5 | Native protocol v4]
Use HELP for help.
token@cqlsh> DESC KEYSPACES;

system_auth         system         default_keyspace     
data_endpoint_auth  datastax_sla   system_views         
system_schema       system_traces  system_virtual_schema

token@cqlsh>

Also, attempted to upgrade to langflow-1.0.0a28 with the same result. Is there any other triage info that I could give you to narrow down this issue?

msmygit commented 1 month ago

fwiw, logs/langflow.log is empty too.