[
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:55 PM:
--------------------------------------------------------------------
Thanks, Adam. I applied code changes per your suggestion, and it I no longer
see the exception. Here is what I changed (replaced all {} with {0}):
{noformat}
--- /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,
{noformat}
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 (replaced all {} with {0}):
{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)