Reputation: 383
I have a small Cassandra cluster hosted on AWS that I want to connect to using the python drivers. Unfortunately I get "Keyspace does not exist" when trying to connect to it from one specific pc. The strange thing is that keyspace exists and I can connect to itfrom other pcs. And I can find that keyspace on that server in cqlsh. How do I fix this error? I've looked into the cassandra version, 3.7.1 which should work fine with my updated python driver. The error is reliably repeatable on that pc. And I can reliably connect to that keyspace on other pcs.
Upvotes: 2
Views: 2878
Reputation: 349
Check if the query from your python driver is using upper case letters for the keyspace name - change it to lower case
Upvotes: 2
Reputation: 2101
Can you check if this keyspace is visible in a list that driver on problematic pc gets when connecting to the cluster i.e. :
>>> from cassandra.cluster import Cluster
>>> cluster = Cluster(['127.0.0.2'])
>>> session = cluster.connect()
>>> for key in cluster.metadata.keyspaces:
... print key
...
system_schema
system_auth
system
system_distributed
system_traces
hello2
hello3
hello_stack
Upvotes: 0