Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-12914

cqlsh describe fails with "list[i] not a string for i in..."

    XMLWordPrintableJSON

Details

    • Low

    Description

      repro:
      Create a keyspace and a few user types.

      use keyspace;
      desc types;
      

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

      "...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
      

      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, we now must encode identifiers in cqlsh to avoid blowing up columnize.

      Attachments

        Issue Links

          Activity

            People

              aholmber Adam Holmberg
              aholmber Adam Holmberg
              Adam Holmberg
              Tom Hobbs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: