[
https://issues.apache.org/jira/browse/CASSANDRA-4113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259976#comment-13259976
]
paul cannon commented on CASSANDRA-4113:
----------------------------------------
Oops, I didn't even read the last part of the report. Didn't know about
locale.getpreferredencoding()- tested it out, and you're right, that's a
perfect fit. Redoing fix.
> cqlsh does not work with piping
> -------------------------------
>
> Key: CASSANDRA-4113
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4113
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.0.3
> Reporter: Pavel Matveyev
> Assignee: paul cannon
> Labels: cqlsh
> Fix For: 1.0.10
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> When I run cqlsh under ant like this
> <target name="create-test-db">
> <exec executable="../dsc-cassandra-1.0.8/bin/cqlsh"
> input="./resource/test/test.cql">
> </exec>
> </target>
> I got:
> [exec] Traceback (most recent call last):
> [exec] File "../dsc-cassandra-1.0.8/bin/cqlsh", line 1891, in <module>
> [exec] main(*read_options(sys.argv[1:], os.environ))
> [exec] File "../dsc-cassandra-1.0.8/bin/cqlsh", line 1863, in main
> [exec] completekey=options.completekey)
> [exec] File "../dsc-cassandra-1.0.8/bin/cqlsh", line 384, in __init__
> [exec] self.output_codec = codecs.lookup(encoding)
> [exec] TypeError: must be string, not None
> [exec] Result: 1
> I suggest replacement of:
> if encoding is None:
> encoding = sys.stdout.encoding
> to:
> if encoding is None:
> encoding=locale.getpreferredencoding()
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira