Syrupy
Syrupy copied to clipboard
Type error in -p and -c command
When I'm using -p command and -c command, it is giving this error
TypeError: decode() argument 1 must be string, not None
Probably you already got it working by now, so I hope this will benefit others who are having this issue (like I was).
You need to set your system's locale since ENCODING = locale.getdefaultlocale()[1]
is getting None
.
To do so, I've done the following (I'm running a Debian based distribution).
apt-get update
apt-get install -y locales
# Uncomment the desired locale (e.g. it_IT.UTF-8 UTF-8) in /etc/locale.gen
sed -i 's/^# *\(it_IT.UTF-8 UTF-8\)/\1/' /etc/locale.gen
# Generate locale
locale-gen
# Export env vars
echo "export LC_ALL=it_IT.UTF-8 UTF-8" >> ~/.bashrc
echo "export LANG=it_IT.UTF-8 UTF-8" >> ~/.bashrc
echo "export LANGUAGE=it_IT.UTF-8 UTF-8" >> ~/.bashrc
For more info and credits, see here