python 3.5.1 OS version 4.4.41-36.55.amzn1.x86_64 (Amazon Linux AMI release 2016.09)
It's fine until I pip install triumphantly to measure complexity using radon, but when I run it with the radon command, I get a Unicode error. When you get a Unicode error, you think you're out.
ERROR: 'ascii' codec can't decode byte 0xe5 in position 47: ordinal not in range(128)
The program that caused the error can be executed independently, and in the first place, only the comment out part is available in Japanese.
When I check pypi, it says to set environment variables. https://pypi.python.org/pypi/radon
Note about file encoding
On some systems, such as Windows, the default encoding is not UTF-8. If you are using Unicode characters in your Python file and want to analyze it with Radon, you’ll have to set the RADONFILESENCODING environment variable to UTF-8.
It's not Windows, but I'll set it up as a trial.
Confirm that the environment variable "RADONFILESEN CODING" itself does not exist.
export -p
Added the environment variable "RADONFILESEN CODING".
declare -x RADONFILESENCODING="UTF-8"
Execute the radon command again
manage.py
F 36:0 main - A (2)
I passed. It was written as windows, so it was through.
Recommended Posts