Skip to main content

Encoding failure in linux command

When running netplan in Linux, I received this error:

UnicodeEncodeError: 'latin-1' codec can't encode character '\u25cf' in position 0: ordinal not in range(256)

A brief search said indicated I needed to set the PYTHONIOENCODING variable to utf8. I did that using:

export PYTHONIOENCODING=utf8

Then when I ran netplan, it showed the black circle that does not exist in the latin-1 codec.

This only lasts for the login session, which was what I wanted, so it wouldn't mess with other things.