'ascii' codec can't decode byte 0xe6 in position 1: ordinal not in range(128). Skipping

[root@host ~]# sudo ./certbot-auto renew --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/www.tingtashuo.cn.conf

Cert not due for renewal, but simulating renewal for dry run
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for www.tingtashuo.cn
Cleaning up challenges
Attempting to renew cert (www.tingtashuo.cn) from /etc/letsencrypt/renewal/www.tingtashuo.cn.conf produced an unexpected error: ‘ascii’ codec can’t decode byte 0xe6 in position 1: ordinal not in range(128). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/www.tingtashuo.cn/fullchain.pem (failure)


** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates below have not been saved.)

All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/www.tingtashuo.cn/fullchain.pem (failure)
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates above have not been saved.)

1 renew failure(s), 0 parse failure(s)

1 Like

The problem has been solved。
Delete all Chinese comments(include nginx.conf)

1 Like

Hi @xiaoyuhao0716,

Nonetheless, you have identified a bug in Certbot because it should not be necessary for users to delete foreign-language comments. So, I’ve just filed an issue about this in our bug tracker.

Sorry for the inconvenience!

1 Like

I tried to add the following code to parse.py, and it works.

import sys
reload(sys)
sys.setdefaultencoding('utf8')

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.