You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Adam Holmberg (JIRA)" <ji...@apache.org> on 2016/11/15 21:43:59 UTC

[jira] [Updated] (CASSANDRA-12914) cqlsh describe fails with "list[i] not a string for i in..."

     [ https://issues.apache.org/jira/browse/CASSANDRA-12914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Holmberg updated CASSANDRA-12914:
--------------------------------------
    Description: 
repro:
Create a keyspace and a few user types.
{code}
use keyspace;
desc types;
{code}

This is caused by a limitation in {{cmd.Cmd.columnize}} in that it doesn't accept unicode, which our identifiers are. Ending stack trace:

{noformat}
"...bin/cqlsh.py", ... in describe_usertypes
    cmd.Cmd.columnize(self, protect_names(ksmeta.user_types.keys()))
  File "/Users/adamholmberg/.pyenv/versions/2.7.8/lib/python2.7/cmd.py", line 363, in columnize
    ", ".join(map(str, nonstrings)))
TypeError: list[i] not a string for i in 0, 1, 2, 3, 4
{noformat}

This was previously obscured because the driver was incorrectly encoding identifiers in {{protect_name}}, which caused other problems for cqlsh schema generation. With that [change|https://github.com/datastax/python-driver/commit/0959b5dc1662d6957f2951738d0a4f053ac78f66], we now must encode identifiers in cqlsh to avoid blowing up {{columnize}}.

  was:
repro:
Create a keyspace and a few user types.
{code}
use keyspace;
desc types;
{code}

This is caused by a limitation in {{cmd.Cmd.columnize}} in that it doesn't accept unicode, which our identifiers are. Ending stack trace:

{noformat}
"...bin/cqlsh.py", ... in describe_usertypes
    cmd.Cmd.columnize(self, protect_names(ksmeta.user_types.keys()))
  File "/Users/adamholmberg/.pyenv/versions/2.7.8/lib/python2.7/cmd.py", line 363, in columnize
    ", ".join(map(str, nonstrings)))
TypeError: list[i] not a string for i in 0, 1, 2, 3, 4
{noformat}

This was previously obscured because the driver was incorrectly encoding identifiers in {{protect_name}}, which caused other problems for cqlsh schema generation. With that [change|https://github.com/datastax/python-driver/commit/0959b5dc1662d6957f2951738d0a4f053ac78f66], we now must encode identifiers in cqlsh to avoid blowing up `columnize`.


> cqlsh describe fails with "list[i] not a string for i in..."
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-12914
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12914
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Adam Holmberg
>            Assignee: Adam Holmberg
>
> repro:
> Create a keyspace and a few user types.
> {code}
> use keyspace;
> desc types;
> {code}
> This is caused by a limitation in {{cmd.Cmd.columnize}} in that it doesn't accept unicode, which our identifiers are. Ending stack trace:
> {noformat}
> "...bin/cqlsh.py", ... in describe_usertypes
>     cmd.Cmd.columnize(self, protect_names(ksmeta.user_types.keys()))
>   File "/Users/adamholmberg/.pyenv/versions/2.7.8/lib/python2.7/cmd.py", line 363, in columnize
>     ", ".join(map(str, nonstrings)))
> TypeError: list[i] not a string for i in 0, 1, 2, 3, 4
> {noformat}
> This was previously obscured because the driver was incorrectly encoding identifiers in {{protect_name}}, which caused other problems for cqlsh schema generation. With that [change|https://github.com/datastax/python-driver/commit/0959b5dc1662d6957f2951738d0a4f053ac78f66], we now must encode identifiers in cqlsh to avoid blowing up {{columnize}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)