# Unicodedecode utf 8 error

**URL:** https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250
**Category:** Help
**Created:** [November 13, 2020, 4:58pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250 "2020-11-13T16:58:27Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 4:58pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/1 "2020-11-13T16:58:27Z")

</div>

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. [https://crt.sh/?q=example.com](https://crt.sh/?q=example.com)), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:life-at-sea.net

I ran this command: sudo certbot --nginx -d [life-at-sea.net](http://life-at-sea.net) -d [www.life-at-sea.net](http://www.life-at-sea.net)

It produced this output:unicodedecode error: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte

My web server is (include version):nginx 1.18.0

The operating system my web server runs on is (include version):ubuntu server 20.04.1 LTS

My hosting provider, if applicable, is:self

I can login to a root shell on my machine (yes or no, or I don't know):yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):no

The version of my client is (e.g. output of `certbot --version` or `certbot-auto --version` if you're using Certbot):certbot version 0.40.0

I have tried to use the grep command: grep -RP "\x92" /etc/nginx/ but this gave no result back.  
utf language is: c.utf-8

This how far i came, can somebody help me?

---

<div class="post-metadata">

### Author: ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)
#### Post date: [November 13, 2020, 5:17pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/2 "2020-11-13T17:17:53Z")

</div>

Hi @edgar

> [@edgar](#):
>
> I have tried to use the grep command: grep -RP "\x92" /etc/nginx/ but this gave no result back.

check the certbot config files too.

---

<div class="post-metadata">

### Author: ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)
#### Post date: [November 13, 2020, 5:18pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/3 "2020-11-13T17:18:43Z")

</div>

Welcome to the Let's Encrypt Community 🙂

It sounds like one of the files used by certbot has some unrecognized characters. What is the whole error message? Try adding `-vvv` to your certbot command then running it again to get more detailed output.

> **[UnicodeDecodeError: "utf-8" codec can't decode byte in position : invalid...](https://www.edureka.co/community/52722/unicodedecodeerror-codec-decode-position-invalid-start-byte)**
>
> While I importing the file it shows UnicodeDecodeError: "utf-8" codec can"t decode byte 0xa0 in position ... as pd a = pd.read\_csv("filename.csv")

---

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 5:40pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/4 "2020-11-13T17:40:57Z")

</div>

uhmmm where can i find those files?

---

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 5:46pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/5 "2020-11-13T17:46:35Z")

</div>

complete error message;

2020-11-13 14:46:37,238:DEBUG:certbot.main:certbot version: 0.40.0  
2020-11-13 14:46:37,239:DEBUG:certbot.main:Arguments: ['--nginx', '-d', '[life-at-sea.net](http://life-at-sea.net)', '-d', '[www.life-at-sea.net](http://www.life-at-sea.net)']  
2020-11-13 14:46:37,239:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)  
2020-11-13 14:46:37,243:DEBUG:certbot.log:Root logging level set at 20  
2020-11-13 14:46:37,243:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2020-11-13 14:46:37,244:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx  
2020-11-13 14:46:37,308:DEBUG:certbot.log:Exiting abnormally:  
Traceback (most recent call last):  
File "/usr/bin/certbot", line 11, in   
load\_entry\_point('certbot==0.40.0', 'console\_scripts', 'certbot')()  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main  
return config.func(config, plugins)  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run  
installer, authenticator = plug\_sel.choose\_configurator\_plugins(config, plugins, "run")  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose\_configurator\_plugins  
authenticator = installer = pick\_configurator(config, req\_inst, plugins)  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick\_configurator  
return pick\_plugin(  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick\_plugin  
verified.prepare()  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare  
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in   
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare  
self.\_initialized.prepare()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/configurator.py", line 195, in prepare  
self.parser = parser.NginxParser(self.conf('server-root'))  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 38, in **init**  
self.load()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 45, in load  
self.\_parse\_recursively(self.config\_root)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 57, in \_parse\_recursively  
trees = self.\_parse\_files(filepath)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 207, in \_parse\_files  
parsed = nginxparser.load(\_file)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/nginxparser.py", line 123, in load  
return loads(\_file.read())  
File "/usr/lib/python3.8/codecs.py", line 322, in decode  
(result, consumed) = self.\_buffer\_decode(data, self.errors, final)  
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte  
2020-11-13 14:46:37,314:ERROR:certbot.log:An unexpected error occurred:  
2020-11-13 14:55:49,549:DEBUG:certbot.main:certbot version: 0.40.0  
2020-11-13 14:55:49,549:DEBUG:certbot.main:Arguments: ['--nginx', '-d', '[life-at-sea.net](http://life-at-sea.net)', '-d', '[www.life-at-sea.net](http://www.life-at-sea.net)']  
2020-11-13 14:55:49,549:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)  
2020-11-13 14:55:49,583:DEBUG:certbot.log:Root logging level set at 20  
2020-11-13 14:55:49,583:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2020-11-13 14:55:49,584:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx  
2020-11-13 14:55:49,650:DEBUG:certbot.log:Exiting abnormally:  
Traceback (most recent call last):  
File "/usr/bin/certbot", line 11, in   
load\_entry\_point('certbot==0.40.0', 'console\_scripts', 'certbot')()  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main  
return config.func(config, plugins)  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run  
installer, authenticator = plug\_sel.choose\_configurator\_plugins(config, plugins, "run")  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose\_configurator\_plugins  
authenticator = installer = pick\_configurator(config, req\_inst, plugins)  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick\_configurator  
return pick\_plugin(  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick\_plugin  
verified.prepare()  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare  
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in   
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare  
self.\_initialized.prepare()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/configurator.py", line 195, in prepare  
self.parser = parser.NginxParser(self.conf('server-root'))  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 38, in **init**  
self.load()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 45, in load  
self.\_parse\_recursively(self.config\_root)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 57, in \_parse\_recursively  
trees = self.\_parse\_files(filepath)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 207, in \_parse\_files  
parsed = nginxparser.load(\_file)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/nginxparser.py", line 123, in load  
return loads(\_file.read())  
File "/usr/lib/python3.8/codecs.py", line 322, in decode  
(result, consumed) = self.\_buffer\_decode(data, self.errors, final)  
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte  
2020-11-13 14:55:49,680:ERROR:certbot.log:An unexpected error occurred:  
2020-11-13 15:18:07,000:DEBUG:certbot.main:certbot version: 0.40.0  
2020-11-13 15:18:07,000:DEBUG:certbot.main:Arguments: ['--nginx', '-d', '[life-at-sea.net](http://life-at-sea.net)', '-d', '[www.life-at-sea.net](http://www.life-at-sea.net)']  
2020-11-13 15:18:07,000:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)  
2020-11-13 15:18:07,004:DEBUG:certbot.log:Root logging level set at 20  
2020-11-13 15:18:07,005:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2020-11-13 15:18:07,005:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx  
2020-11-13 15:18:07,070:DEBUG:certbot.log:Exiting abnormally:  
Traceback (most recent call last):  
File "/usr/bin/certbot", line 11, in   
load\_entry\_point('certbot==0.40.0', 'console\_scripts', 'certbot')()  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main  
return config.func(config, plugins)  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run  
installer, authenticator = plug\_sel.choose\_configurator\_plugins(config, plugins, "run")  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose\_configurator\_plugins  
authenticator = installer = pick\_configurator(config, req\_inst, plugins)  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick\_configurator  
return pick\_plugin(  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick\_plugin  
verified.prepare()  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare  
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in   
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare  
self.\_initialized.prepare()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/configurator.py", line 195, in prepare  
self.parser = parser.NginxParser(self.conf('server-root'))  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 38, in **init**  
self.load()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 45, in load  
self.\_parse\_recursively(self.config\_root)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 57, in \_parse\_recursively  
trees = self.\_parse\_files(filepath)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 207, in \_parse\_files  
parsed = nginxparser.load(\_file)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/nginxparser.py", line 123, in load  
return loads(\_file.read())  
File "/usr/lib/python3.8/codecs.py", line 322, in decode  
(result, consumed) = self.\_buffer\_decode(data, self.errors, final)  
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte  
2020-11-13 15:18:07,071:ERROR:certbot.log:An unexpected error occurred:  
2020-11-13 15:20:00,943:DEBUG:certbot.main:certbot version: 0.40.0  
2020-11-13 15:20:00,943:DEBUG:certbot.main:Arguments: ['--nginx', '-d', '[life-at-sea.net](http://life-at-sea.net)', '-d', '[www.life-at-sea.net](http://www.life-at-sea.net)']  
2020-11-13 15:20:00,943:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)  
2020-11-13 15:20:00,948:DEBUG:certbot.log:Root logging level set at 20  
2020-11-13 15:20:00,948:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2020-11-13 15:20:00,948:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx  
2020-11-13 15:20:01,012:DEBUG:certbot.log:Exiting abnormally:  
Traceback (most recent call last):  
File "/usr/bin/certbot", line 11, in   
load\_entry\_point('certbot==0.40.0', 'console\_scripts', 'certbot')()  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main  
return config.func(config, plugins)  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run  
installer, authenticator = plug\_sel.choose\_configurator\_plugins(config, plugins, "run")  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose\_configurator\_plugins  
authenticator = installer = pick\_configurator(config, req\_inst, plugins)  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick\_configurator  
return pick\_plugin(  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick\_plugin  
verified.prepare()  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare  
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in   
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare  
self.\_initialized.prepare()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/configurator.py", line 195, in prepare  
self.parser = parser.NginxParser(self.conf('server-root'))  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 38, in **init**  
self.load()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 45, in load  
self.\_parse\_recursively(self.config\_root)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 57, in \_parse\_recursively  
trees = self.\_parse\_files(filepath)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 207, in \_parse\_files  
parsed = nginxparser.load(\_file)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/nginxparser.py", line 123, in load  
return loads(\_file.read())  
File "/usr/lib/python3.8/codecs.py", line 322, in decode  
(result, consumed) = self.\_buffer\_decode(data, self.errors, final)  
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte  
2020-11-13 15:20:01,013:ERROR:certbot.log:An unexpected error occurred:  
2020-11-13 15:32:38,682:DEBUG:certbot.main:certbot version: 0.40.0  
2020-11-13 15:32:38,682:DEBUG:certbot.main:Arguments: ['--nginx', '-d', '[life-at-sea.net](http://life-at-sea.net)', '-d', '[www.life-at-sea.net](http://www.life-at-sea.net)']  
2020-11-13 15:32:38,682:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)  
2020-11-13 15:32:38,687:DEBUG:certbot.log:Root logging level set at 20  
2020-11-13 15:32:38,687:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2020-11-13 15:32:38,687:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx  
2020-11-13 15:32:38,752:DEBUG:certbot.log:Exiting abnormally:  
Traceback (most recent call last):  
File "/usr/bin/certbot", line 11, in   
load\_entry\_point('certbot==0.40.0', 'console\_scripts', 'certbot')()  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main  
return config.func(config, plugins)  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run  
installer, authenticator = plug\_sel.choose\_configurator\_plugins(config, plugins, "run")  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose\_configurator\_plugins  
authenticator = installer = pick\_configurator(config, req\_inst, plugins)  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick\_configurator  
return pick\_plugin(  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick\_plugin  
verified.prepare()  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare  
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in   
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare  
self.\_initialized.prepare()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/configurator.py", line 195, in prepare  
self.parser = parser.NginxParser(self.conf('server-root'))  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 38, in **init**  
self.load()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 45, in load  
self.\_parse\_recursively(self.config\_root)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 57, in \_parse\_recursively  
trees = self.\_parse\_files(filepath)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 207, in \_parse\_files  
parsed = nginxparser.load(\_file)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/nginxparser.py", line 123, in load  
return loads(\_file.read())  
File "/usr/lib/python3.8/codecs.py", line 322, in decode  
(result, consumed) = self.\_buffer\_decode(data, self.errors, final)  
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte  
2020-11-13 15:32:38,753:ERROR:certbot.log:An unexpected error occurred:  
2020-11-13 15:48:13,598:DEBUG:certbot.main:certbot version: 0.40.0  
2020-11-13 15:48:13,598:DEBUG:certbot.main:Arguments: ['--nginx', '-d', '[life-at-sea.net](http://life-at-sea.net)', '-d', '[www.life-at-sea.net](http://www.life-at-sea.net)']  
2020-11-13 15:48:13,598:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)  
2020-11-13 15:48:13,602:DEBUG:certbot.log:Root logging level set at 20  
2020-11-13 15:48:13,602:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2020-11-13 15:48:13,603:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx  
2020-11-13 15:48:13,668:DEBUG:certbot.log:Exiting abnormally:  
Traceback (most recent call last):  
File "/usr/bin/certbot", line 11, in   
load\_entry\_point('certbot==0.40.0', 'console\_scripts', 'certbot')()  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main  
return config.func(config, plugins)  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run  
installer, authenticator = plug\_sel.choose\_configurator\_plugins(config, plugins, "run")  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose\_configurator\_plugins  
authenticator = installer = pick\_configurator(config, req\_inst, plugins)  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick\_configurator  
return pick\_plugin(  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick\_plugin  
verified.prepare()  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare  
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in   
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare  
self.\_initialized.prepare()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/configurator.py", line 195, in prepare  
self.parser = parser.NginxParser(self.conf('server-root'))  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 38, in **init**  
self.load()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 45, in load  
self.\_parse\_recursively(self.config\_root)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 57, in \_parse\_recursively  
trees = self.\_parse\_files(filepath)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 207, in \_parse\_files  
parsed = nginxparser.load(\_file)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/nginxparser.py", line 123, in load  
return loads(\_file.read())  
File "/usr/lib/python3.8/codecs.py", line 322, in decode  
(result, consumed) = self.\_buffer\_decode(data, self.errors, final)  
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte  
2020-11-13 15:48:13,669:ERROR:certbot.log:An unexpected error occurred:  
2020-11-13 16:26:03,144:DEBUG:certbot.main:certbot version: 0.40.0  
2020-11-13 16:26:03,145:DEBUG:certbot.main:Arguments:   
2020-11-13 16:26:03,145:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)  
2020-11-13 16:26:03,149:DEBUG:certbot.log:Root logging level set at 20  
2020-11-13 16:26:03,149:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2020-11-13 17:35:25,495:DEBUG:certbot.main:certbot version: 0.40.0  
2020-11-13 17:35:25,495:DEBUG:certbot.main:Arguments: ['-vvv', '--nginx', '-d', '[life-at-sea.net](http://life-at-sea.net)', '-d', '[www.life-at-sea.net](http://www.life-at-sea.net)']  
2020-11-13 17:35:25,495:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)  
2020-11-13 17:35:25,500:DEBUG:certbot.log:Root logging level set at -10  
2020-11-13 17:35:25,500:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log  
2020-11-13 17:35:25,501:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx  
2020-11-13 17:35:25,566:DEBUG:certbot.log:Exiting abnormally:  
Traceback (most recent call last):  
File "/usr/bin/certbot", line 11, in   
load\_entry\_point('certbot==0.40.0', 'console\_scripts', 'certbot')()  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main  
return config.func(config, plugins)  
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run  
installer, authenticator = plug\_sel.choose\_configurator\_plugins(config, plugins, "run")  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose\_configurator\_plugins  
authenticator = installer = pick\_configurator(config, req\_inst, plugins)  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick\_configurator  
return pick\_plugin(  
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick\_plugin  
verified.prepare()  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare  
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in   
return [plugin\_ep.prepare() for plugin\_ep in six.itervalues(self.\_plugins)]  
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare  
self.\_initialized.prepare()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/configurator.py", line 195, in prepare  
self.parser = parser.NginxParser(self.conf('server-root'))  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 38, in **init**  
self.load()  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 45, in load  
self.\_parse\_recursively(self.config\_root)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 67, in \_parse\_recursively  
self.\_parse\_recursively(subentry[1])  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 57, in \_parse\_recursively  
trees = self.\_parse\_files(filepath)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/parser.py", line 207, in \_parse\_files  
parsed = nginxparser.load(\_file)  
File "/usr/lib/python3/dist-packages/certbot\_nginx/nginxparser.py", line 123, in load  
return loads(\_file.read())  
File "/usr/lib/python3.8/codecs.py", line 322, in decode  
(result, consumed) = self.\_buffer\_decode(data, self.errors, final)  
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte  
2020-11-13 17:35:25,579:ERROR:certbot.log:An unexpected error occurred:

---

<div class="post-metadata">

### Author: ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)
#### Post date: [November 13, 2020, 5:57pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/6 "2020-11-13T17:57:45Z")

</div>

> [@edgar](#):
>
> where can i find those files?

Check the documentation

[https://certbot.eff.org/docs/using.html#configuration-file](https://certbot.eff.org/docs/using.html#configuration-file)

Other solution: Use `--webroot`, may be first with certonly. Then the nginx config file isn't parsed.

If you don't have the error, you know it's a problem with your nginx. There is somewhere a wrong character / a file with a one-byte encoding and a non-ASCII character.

If you have the problem again, the error is in your Certbot config.

---

<div class="post-metadata">

### Author: ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)
#### Post date: [November 13, 2020, 6:02pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/7 "2020-11-13T18:02:47Z")

</div>

JuergenAuer has made an excellent suggestion to divide and conquer. Given the output, I strongly suspect the problem is in your nginx configuration files. If the webroot authenticator works, give us the output of `nginx -T` (with three backticks ``` alone on the lines above and below the output to make it clear).

---

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 6:13pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/8 "2020-11-13T18:13:31Z")

</div>

![2020-11-13_19-11-28](https://global.discourse-cdn.com/letsencrypt/original/3X/4/0/40a6aa2c90171b8381cf45b5891d192c7eadae90.png) the message it gave

---

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 6:27pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/9 "2020-11-13T18:27:28Z")

</div>

As far as i understand this is all chinese for me.

---

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 6:36pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/10 "2020-11-13T18:36:35Z")

</div>

I am trying to follow but this is not the way i understand

---

<div class="post-metadata">

### Author: ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)
#### Post date: [November 13, 2020, 6:50pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/11 "2020-11-13T18:50:26Z")

</div>

You forgot to specify the actual webroot folder. 🙂

Try this:  
`sudo certbot certonly --webroot -w /var/www/html -d "life-at-sea.net,www.life-at-sea.net" --dry-run -vvv`

---

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 6:55pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/12 "2020-11-13T18:55:05Z")

</div>

It looks like i dont get the error anymore

---

<div class="post-metadata">

### Author: ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)
#### Post date: [November 13, 2020, 6:57pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/13 "2020-11-13T18:57:17Z")

</div>

From the command I just gave?

---

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 6:57pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/14 "2020-11-13T18:57:34Z")

</div>

![2020-11-13_19-56-38](https://global.discourse-cdn.com/letsencrypt/original/3X/0/4/04f086befb79e8d79d1f2cc6176e47b14b065756.png)

---

<div class="post-metadata">

### Author: ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)
#### Post date: [November 13, 2020, 7:02pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/16 "2020-11-13T19:02:07Z")

</div>

So I've got some news for you...

 ![Screenshot_20201113-115917_Samsung Internet](https://global.discourse-cdn.com/letsencrypt/original/3X/1/8/18ed623c2c9da05ed4f740433c77293b19e790e6.jpeg)

I **highly** recommend enabling _Full SSL (strict)_. Otherwise, Cloudflare uses their certificate from your visitors to Cloudflare then your certificate from Cloudflare to your server. Do you use load balancing?

If you do want to use Cloudflare's certificate, there is a much better way of managing your certificates than certbot: use a Cloudflare Origin CA. They last MUCH longer than a Let's Encrypt certificate and are easy to manage in Cloudflare's software.

> **[Managing Cloudflare Origin CA certificates](https://support.cloudflare.com/hc/en-us/articles/115000479507-Managing-Cloudflare-Origin-CA-certificates)**
>
> Understand how to use a Cloudflare Origin CA certificate to encrypt traffic between Cloudflare and your origin web server. Learn how to manage Origin CA certificates via Cloudflare and receive advi...

---

<div class="post-metadata">

### Author: ![griffin](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/griffin/32/50204_2.png) [@griffin](https://community.letsencrypt.org/u/griffin)
#### Post date: [November 13, 2020, 7:30pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/17 "2020-11-13T19:30:59Z")

</div>

I get a 403 Forbidden for:

[http://life-at-sea.net/.well-known/acme-challenge/test](http://life-at-sea.net/.well-known/acme-challenge/test)

HSTS preload header present. No redirect to HTTPS?

* * *

I get a 522 Connection Timed Out for:

[https://life-at-sea.net/.well-known/acme-challenge/test](https://life-at-sea.net/.well-known/acme-challenge/test)

[http://www.life-at-sea.net/.well-known/acme-challenge/test](http://www.life-at-sea.net/.well-known/acme-challenge/test) -\>  
[https://www.life-at-sea.net/.well-known/acme-challenge/test](https://www.life-at-sea.net/.well-known/acme-challenge/test)

These should be 404 Not Found.

---

<div class="post-metadata">

### Author: ![edgar](https://avatars.discourse-cdn.com/v4/letter/e/b487fb/32.png) [@edgar](https://community.letsencrypt.org/u/edgar)
#### Post date: [November 13, 2020, 8:00pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/18 "2020-11-13T20:00:42Z")

</div>

correct at the moment busy with the cloudflare certificate.

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)
#### Post date: [December 13, 2020, 8:00pm UTC](https://community.letsencrypt.org/t/unicodedecode-utf-8-error/138250/19 "2020-12-13T20:00:43Z")

</div>

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