yagmail报错:UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0x82 in position 0: invalid start byte

## yagmail sends an email and reports an error
Python reads the file UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 0: invalid start byte Reason for the error: The as shown in the red box
host name is a non-ascii character (in vernacular: the computer name needs to be changed, if If it is Chinese, change it to English or other)
cmd to view the host name

The way to check the host name: open cmd ——> enter ipconfig/all
the modification method: Settings—>system—>about——>rename the computer.
After restarting, the problem will be solved! ! ! (thanks to the team leader for his help)

Guess you like

Origin blog.csdn.net/yzq199902/article/details/114700649