Problem with "special characters"

Hi! i am traying to use this code

certbot --authenticator webroot --installer nginx

The problem is the folder is “montaña.com” and when i put the webroot

/home/admin/web/montaña.com/public_html

I get an error

Encountered exception during recovery
’ascii’ codec can’t decode byte 0xc3 in position 21: ordinal not in range(128)
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/certbot/error_handler.py”, line 100, in _call_registered
self.funcs-1
File “/usr/lib/python2.7/site-packages/certbot/auth_handler.py”, line 284, in _cleanup_challenges
self.auth.cleanup(achalls)
File “/usr/lib/python2.7/site-packages/certbot/plugins/webroot.py”, line 215, in cleanup
validation_path = self._get_validation_path(root_path, achall)
File “/usr/lib/python2.7/site-packages/certbot/plugins/webroot.py”, line 189, in _get_validation_path
return os.path.join(root_path, achall.chall.encode(“token”))
File “/usr/lib64/python2.7/posixpath.py”, line 80, in join
path += ‘/’ + b
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 21: ordinal not in range(128)
An unexpected error occurred:
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 21: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.

Weird. Looks like it was fixed previously but for sure it does not work as in your example.

You can work around this by symlinking an ASCII path to your webroot, or by patching /usr/lib/python2.7/site-packages/certbot/plugins/webroot.py line 189 directly:

return os.path.join(root_path.decode('utf-8'), achall.chall.encode("token"))

Added an issue to Certbot: https://github.com/certbot/certbot/issues/5512

Thx for your reply. Can you tell me how can make a symlink to this webroot

/home/admin/web/montaña.com/public_html

You could e.g. do

ln -s /home/admin/web/montaña.com/public_html /home/admin/web/montana-ascii

and then invoke Certbot with the different webroot

-w /home/admin/web/montana-ascii

well… i did it and i made the cert but i get this error in vestacp when i active Lets Encrypt box

Error: Invalid response from http://montaña.com/.well-known/acme-challenge/uxmJvUREpBJOXioTuyqUkfhv2O-6MUumAmdIf3avk: \

Its weird because i dont have any problem with my other domains

Well i cant understand nothing but its solved.
I deleted all and after i follow the process and its OK.

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