ResultSet object does not have attribute 'column_types

I installed cassandra on my mac using

homebrew install cassandra 

He installed the cassandra version

 [cqlsh 5.0.1 | Cassandra 3.10 | CQL spec 3.4.4 | Native protocol v4] 

Now I connect to cassandra using cqlsh and create a keyspace and table. when i try to query a table in cqlsh. I get an error

 'ResultSet' object has no attribute 'column_types 

I was looking for an error and found this

https://groups.google.com/forum/#!msg/nosql-databases/O3kZmk8AoeY/PooBo9uWDQAJ

https://issues.apache.org/jira/browse/CASSANDRA-12799

But I don’t understand what exactly was in the solution ... the second link seems to suggest that the problem is automatically resolved ... but for me this is clearly not

+5
source share
4 answers

I will just send a transfer request with a fix for the homebrew project: https://github.com/Homebrew/homebrew-core/pull/10650

+2
source

I get the same error after upgrading from 3.9 to 3.10 using brew. Unfortunately, I could not find the reason and answer. I explored installing and uninstalling other versions that were also installed via pip (cqlsh, cassandra-driver).

Looking for an alternative, I installed cassandra via docker, which I hope is also a viable alternative for you - it works for me.

Using the manual from docker-cassandra - https://hub.docker.com/_/cassandra/ I configure and connect to cassandra 3.10 with the following two commands (assuming docker ist is mostly installed from a DMG file).

 docker run --name cas310 -p 9042:9042 -d cassandra:3.10 docker exec -it cas310 cqlsh 

It also allows you to access cassandra through CQL from outside the container through the default cql port 9042.

Note. Connecting to a docked cassandra instance using cqlsh from the version of cassandra i installed via brew on the host results in the same error message. Therefore, it makes me believe that there are some problems with the python driver packaged with cassandras brew -package.

+1
source

I had this problem on my macOS working laptop a few days ago; fixed as follows (from memory does not work):

  • pip uninstall cql , cqlsh, cassandra-driver and everything else that looks related.
  • brew uninstall cassandra (your data will remain in order).
  • brew install python - I believe this is a key step because python macOS causes incompatibilities.
  • brew install cassandra (this may be enough to fix the problem, if not, continue).
  • sudo pip install cqlsh (I know sudo is not very good - maybe you can change this step to the previous brew install cassandra to avoid using sudo).

This fixed the problem for me, but left me with incompatible protocol versions that I temporarily resolved with cqlsh --cqlversion="#.#.#"

0
source

Try the following: pip install cassandra-driver --upgrade

0
source

Source: https://habr.com/ru/post/1264946/


All Articles