question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error when running 'sudo pihole5-list-tool'

See original GitHub issue

Hello jessedp, I’m having an error appear when trying to run your tool. I’m using a raspberry pi 4 on the latest version of raspbian (buster). I followed the instruction in your post for installation which reported fine, then when trying to run the tool I get the following:

Traceback (most recent call last): File "/usr/local/bin/pihole5-list-tool", line 10, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/ph5lt.py", line 82, in main print(color(' \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510', fg='#b61042')) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 21-64: ordinal not in range(256)

Seen this before? I will admit I know nothing of programming, and am a basic linux user. I followed many guides to get pi-hole 5 up and running and any help you can offer on this issue would be awesome. Thank you very much!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
MexSalemcommented, Jun 3, 2020

Some helpful commands in terminal Display current locale settings: $ locale Show available locales: $ locale -a If a locale does not appear in the list, it must be generated: $ sudo locale-gen en_GB.UTF-8 A list of all available locales can be found in the following file: $ cat /usr/share/i18n/SUPPORTED Adjust Locales: The default settings are stored in the file /etc/default/locale:

$ cat /etc/default/locale 
LANG=en_US.UTF-8

This file can either be adjusted manually or updated with the update-locale tool: $ sudo update-locale LANG=en_GB.UTF-8 (Hint: update-locale also generates the file /etc/default/locale if it does not exist.) Then reboot the system or open a new console.

UTF-8 encoding in terminal is required for pihole5-list-tool to show the red frame on startup…

0reactions
jessedpcommented, May 26, 2020

That’s amazing, I love it. I’m pretty sure that all that mattered was the Character Set if you want to change the Country back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing the “Command Not Found” Error When Using Sudo
In this tutorial, we'll go over the causes for the “command not found” error when using sudo and explore possible fixes.
Read more >
Sudo comes up with an error, cannot run anything as root
I try typing in just sudo but that comes up with the same three errors as above. Also in /etc/ sudo.conf does not...
Read more >
Command not found when using sudo - Stack Overflow
The directory where foo.sh resides is not present in the PATH variable of the root user, hence the command not found error. Share....
Read more >
sudo: Sorry, you must have a tty to run sudo Error on a Linux ...
Explains how to fix error "sudo: sorry, you must have a tty to run sudo" when used under a Linux, FreeBSD, OpenBSD, CentOS,...
Read more >
Resolve syntax errors that occur after editing the sudoers file ...
I edited the sudoers file on my EC2 instance and now I'm receiving syntax errors when trying to run sudo commands. How do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found