[英]Cassandra : 'ascii' codec can't encode character u'\xe9' in position 218: ordinal not in range(128)
I have cqlsh on Ubuntu 16.04 and here's my version of cqlsh : 我在Ubuntu 16.04上有cqlsh,这是我的cqlsh版本:
[cqlsh 5.0.1 | Cassandra 3.10 | CQL spec 3.4.4 | Native protocol v4]
I can't create a keyspace and the error I get is this one : 我无法创建密钥空间,而我得到的错误是这个:
'ascii' codec can't encode character u'\xe9' in position 218: ordinal not in range(128)
How can I get it to work? 我如何使它工作?
I tried to log in with this command : 我尝试使用以下命令登录:
cqlsh 127.0.0.1 9042 -u cassandra -p cassandra --cqlversion="3.4.4" --encoding utf-8
but it didn't work. 但这没用。
Command to create a keyspace that I used : 创建我使用的键空间的命令:
CREATE KEYSPACE Excelsior
WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 3};
Thanks for any answer. 感谢您的任何答复。
The error say that CQLSH
ascii
encoder can't encode the unicode character u'\\xe9' which represent é
错误提示CQLSH
ascii
编码器无法编码表示é
的unicode字符u'\\ xe9'
So when creating keyspace use keyspace name in ascii format. 因此,在创建键空间时,请使用ascii格式的键空间名称。
By the way using your create keyspace command gives me no error, but if i use keyspace name with unicode character like 'éxcelsior'
can produce the exact same error 顺便说一句,使用您的create keyspace命令不会给我任何错误,但是如果我使用带有Unicode字符(例如'éxcelsior'
键空间名称,则会产生完全相同的错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.