无法在CQLSH中看到blob数据

时间:2018-02-01 05:03:22

标签: python-2.7 cassandra cassandra-3.0 cqlsh

在查询cassandra表的字节数组列时,不是显示字节表示,而是CQLSH尝试解码该值并给出以下错误:

Failed to format value
'\x8eV4\xfe}\xd9p5\xb3Q\xf8\x87\xc1v3\xe7x!\x00\xd5\xaa>' 
: 'ascii' codec can't decode byte 0x8e in position 0: ordinal not in range(128)

Python版本:2.7.14和CQL版本:5.0.1

1 个答案:

答案 0 :(得分:0)

我在ccm(OS X)中得到了同样的错误

我使用〜/ .ccm / repository / gitCOLONcassandra-3.11 / bin / cqlsh而不是〜/ .ccm // node1 / bin / cqlsh或/ usr / local / bin / cqlsh(通过pip或其他东西安装)。< / p>

另一种可能的解决方案是使用--encoding = utf8选项。

相关问题