[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #28921 [Core Tor/Stem]: tor-prompt command 'GETINFO desc/all-recent > /dev/null' fails
#28921: tor-prompt command 'GETINFO desc/all-recent > /dev/null' fails
------------------------+-------------------------------
Reporter: wagon | Owner: atagar
Type: defect | Status: assigned
Priority: Medium | Component: Core Tor/Stem
Version: | Severity: Normal
Keywords: descriptor | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
------------------------+-------------------------------
If redirection is used, it fails:
{{{
$ tor-prompt --run 'GETINFO desc/all-recent' 1>/dev/null
Traceback (most recent call last):
File "/path/to/stem/tor-prompt", line 8, in <module>
stem.interpreter.main()
File "/path/to/stem/stem/interpreter/__init__.py", line 151, in main
interpreter.run_command(args.run_cmd, print_response = True)
File "/path/to/stem/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/path/to/stem/stem/interpreter/commands.py", line 381, in
run_command
print(output)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u021b' in
position 1237805: ordinal not in range(128)
}}}
If redirection is not used, it works.
I think atagar is right in his comment:
> I suspect the issue is that you're using python3, and that `tor-prompt`
is using `print()` which expect unicode. Server descriptors can have non-
ascii content on contact lines which can cause the stacktrace you cited
above.
> I probably need to add some escaping within `tor-prompt`.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28921>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs