Closed bogdanm closed 8 years ago
Is this at all related to #657 ?
When I try:
$ yt --plain search -s --limit 10000 mbed-hal-nordic
I got thrilling:
Traceback (most recent call last):
File "C:\Python27\Scripts\yt-script.py", line 9, in <module>
load_entry_point('yotta', 'console_scripts', 'yt')()
File "c:\work\przemek\yotta\yotta\main.py", line 201, in main
status = args.command(args, following_args)
File "c:\work\przemek\yotta\yotta\search.py", line 128, in execCommand
print(formatResult(result, args.plain, short=args.short))
File "C:\Python27\lib\site-packages\colorama\ansitowin32.py", line 36, in write
self.__convertor.write(text)
File "C:\Python27\lib\site-packages\colorama\ansitowin32.py", line 137, in write
self.write_and_convert(text)
File "C:\Python27\lib\site-packages\colorama\ansitowin32.py", line 165, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "C:\Python27\lib\site-packages\colorama\ansitowin32.py", line 170, in write_plain_text
self.wrapped.write(text[start:end])
File "C:\Python27\lib\encodings\cp437.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2014' in position 157: character maps to <undefined>
Is this at all related to #657 ?
I don't think so, they look like different issues. @PrzemekWirkus, it might be that you're using a terminal that doesn't support Unicode encodings. One more reason to fix this issue.
Setting PYTHONIOENCODING="utf-8"
(for example) should let you work around this.
Yup, that does the trick just fine, thanks!
Without redirection, the command works.
Environment: Linux Mint 17.1