vikstrous / pirate-get

A command line interface for The Pirate Bay
GNU Affero General Public License v3.0
338 stars 53 forks source link

UnicodeEncodeError: 'ascii' codec can't encode character #114

Closed brunohjorge closed 6 years ago

brunohjorge commented 6 years ago

I just installed pirate-get, and got this error every time the search has some items. Anyone knows if this is an issue or something that i'm missing?

pirate-get search home Trying https://thepiratebay.org/... Ok Traceback (most recent call last): File "/usr/bin/pirate-get", line 9, in load_entry_point('pirate-get==0.2.12', 'console_scripts', 'pirate-get')() File "/usr/lib/python3.4/site-packages/pirate_get-0.2.12-py3.4.egg/pirate/pirate.py", line 430, in main pirate_main(args) File "/usr/lib/python3.4/site-packages/pirate_get-0.2.12-py3.4.egg/pirate/pirate.py", line 344, in pirate_main printer.search_results(results, local=args.source == 'local_tpb') File "/usr/lib/python3.4/site-packages/pirate_get-0.2.12-py3.4.egg/pirate/print.py", line 98, in search_results self.print(table) File "/usr/lib/python3.4/site-packages/pirate_get-0.2.12-py3.4.egg/pirate/print.py", line 37, in print return builtins.print(*args, **kwargs) UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 162: ordinal not in range(128)

rnhmjoj commented 6 years ago

pirate-get outputs in UTF-8. You must set your terminal encoding accordingly. See the previous reports here.

brunohjorge commented 6 years ago

That was the issue! thanks! :D