vikstrous / pirate-get

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

getting "UnicodeEncodeError: 'ascii' " while running the pirate-get #130

Closed icherfas closed 4 years ago

icherfas commented 4 years ago

~$ pirate-get "the mandalorian" Trying http://thepiratebay.org... Ok Traceback (most recent call last): File "/home/osmc/.local/bin/pirate-get", line 11, in sys.exit(main()) File "/home/osmc/.local/lib/python3.5/site-packages/pirate/pirate.py", line 449, in main pirate_main(args) File "/home/osmc/.local/lib/python3.5/site-packages/pirate/pirate.py", line 358, in pirate_main printer.search_results(results, local=args.source == 'local_tpb') File "/home/osmc/.local/lib/python3.5/site-packages/pirate/print.py", line 101, in search_results self.print(table) File "/home/osmc/.local/lib/python3.5/site-packages/pirate/print.py", line 37, in print return builtins.print(*args, **kwargs) UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 149: ordinal not in range(128)

I'm running on rpi 3 running OSMC os.

rnhmjoj commented 4 years ago

See issue #101. In short your terminal text encoding is set to ASCII but it must be UTF-8 (or some other Unicode) to display the output of pirate-get.

icherfas commented 4 years ago

It did the trick. Thank you very much!