Cassandra 3.1 python driver 'no viable alternative at input describe'

Viewed 7322

I can't run describe keyspaces for some reason, even though I'm clearly connecting to my Cassandra 3.3 host via the 3.1 python driver. Some other commands seem to work fine.

Thanks in advance!

    from cassandra.cluster import Cluster
        cluster = Cluster(['192.168.1.53'])
        #session = cluster.connect('node_data')
        session = cluster.connect()
        session.execute('USE node_data')
        rows = session.execute('SELECT * FROM users')
        session.execute('DESCRIBE KEYSPACES;')

---------------------------------------------------------------------------
SyntaxException                           Traceback (most recent call last)
<ipython-input-5-8b1f82917aa9> in <module>()
----> 1 session.execute('DESCRIBE KEYSPACES;')
      2 

/Users/natemarks/.virtualenvs/cassandra/lib/python2.7/site-packages/cassandra/cluster.so in cassandra.cluster.Session.execute (cassandra/cluster.c:27107)()

/Users/natemarks/.virtualenvs/cassandra/lib/python2.7/site-packages/cassandra/cluster.so in cassandra.cluster.ResponseFuture.result (cassandra/cluster.c:60227)()

SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:0 no viable alternative at input 'DESCRIBE' ([DESCRIBE]...)">
2 Answers
Related