cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Okelberry (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-10282) cqlsh exception when starting with "--debug" option
Date Tue, 08 Sep 2015 21:58:45 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-10282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14735695#comment-14735695
] 

Ryan Okelberry edited comment on CASSANDRA-10282 at 9/8/15 9:57 PM:
--------------------------------------------------------------------

Thanks, Adam.  I applied code changes per your suggestion, and it I no longer see the exception.
  Here is what I changed:

{code}
--- /usr/bin/cqlsh	2015-09-08 14:53:11.000000000 -0700
+++ /tmp/cqlsh	2015-09-08 14:52:59.000000000 -0700
@@ -2349,7 +2349,7 @@
     try:
         options.connect_timeout = int(options.connect_timeout)
     except ValueError:
-        parser.error('{} is not a valid timeout.'.format(options.connect_timeout))
+        parser.error('{0} is not a valid timeout.'.format(options.connect_timeout))
         options.connect_timeout = DEFAULT_CONNECT_TIMEOUT_SECONDS
 
     options.client_timeout = option_with_default(configs.get, 'connection', 'client_timeout',
'10')
@@ -2445,8 +2445,8 @@
             sys.exit("Can't open %r: %s" % (options.file, e))
 
     if options.debug:
-        sys.stderr.write("Using CQL driver: {}\n".format(cassandra))
-        sys.stderr.write("Using connect timeout: {} seconds\n".format(options.connect_timeout))
+        sys.stderr.write("Using CQL driver: {0}\n".format(cassandra))
+        sys.stderr.write("Using connect timeout: {0} seconds\n".format(options.connect_timeout))
 
     try:
         shell = Shell(hostname,
{code}


was (Author: rokelber):
Thanks, Adam.  I applied code changes per your suggestion, and it I no longer see the exception.
  Here is what I changed:

{code}
--- /tmp/cqlsh	2015-09-08 14:52:59.000000000 -0700
+++ /usr/bin/cqlsh	2015-09-08 14:53:11.000000000 -0700
@@ -2349,7 +2349,7 @@
     try:
         options.connect_timeout = int(options.connect_timeout)
     except ValueError:
-        parser.error('{0} is not a valid timeout.'.format(options.connect_timeout))
+        parser.error('{} is not a valid timeout.'.format(options.connect_timeout))
         options.connect_timeout = DEFAULT_CONNECT_TIMEOUT_SECONDS
 
     options.client_timeout = option_with_default(configs.get, 'connection', 'client_timeout',
'10')
@@ -2445,8 +2445,8 @@
             sys.exit("Can't open %r: %s" % (options.file, e))
 
     if options.debug:
-        sys.stderr.write("Using CQL driver: {0}\n".format(cassandra))
-        sys.stderr.write("Using connect timeout: {0} seconds\n".format(options.connect_timeout))
+        sys.stderr.write("Using CQL driver: {}\n".format(cassandra))
+        sys.stderr.write("Using connect timeout: {} seconds\n".format(options.connect_timeout))
 
     try:
         shell = Shell(hostname,
{code}

> cqlsh exception when starting with "--debug" option 
> ----------------------------------------------------
>
>                 Key: CASSANDRA-10282
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10282
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: CentOS 6.4 x86_64
>            Reporter: Ryan Okelberry
>            Priority: Minor
>              Labels: cqlsh
>             Fix For: 2.1.x
>
>
> {code}
> [root@host ~]# cqlsh --version
> cqlsh 5.0.1
> {code}
> {code}
> [root@host ~]# cqlsh --debug
> Traceback (most recent call last):
>   File "/usr/bin/cqlsh", line 2487, in <module>
>     main(*read_options(sys.argv[1:], os.environ))
>   File "/usr/bin/cqlsh", line 2448, in main
>     sys.stderr.write("Using CQL driver: {}\n".format(cassandra))
> ValueError: zero length field name in format
> {code}



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

Mime
View raw message