UnicodeDecodeError: 'utf-8'

My domain is: vsbt174.ru

I ran this command: sudo certbot --apache

It produced this output:
An unexpected error occurred:
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xbd in position 0: invalid start byte
Please see the logfile ‘/tmp/tmprxyk78uk’ for more details.

2020-05-12 18:57:16,955:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File “/usr/bin/certbot”, line 11, in
load_entry_point(‘certbot==0.31.0’, ‘console_scripts’, ‘certbot’)()
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 1335, in main
plugins = plugins_disco.PluginsRegistry.find_all()
File “/usr/lib/python3/dist-packages/certbot/plugins/disco.py”, line 206, in find_all
plugin_ep = PluginEntryPoint(entry_point)
File “/usr/lib/python3/dist-packages/certbot/plugins/disco.py”, line 52, in init
self.plugin_cls = entry_point.load()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 2291, in load
return self.resolve()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 2297, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/lib/python3/dist-packages/certbot/plugins/standalone.py”, line 14, in
from acme import standalone as acme_standalone
File “/usr/lib/python3/dist-packages/acme/standalone.py”, line 11, in
from six.moves import BaseHTTPServer # type: ignore # pylint: disable=import-error
File “”, line 1013, in _handle_fromlist
File “/usr/lib/python3/dist-packages/six.py”, line 92, in get
result = self._resolve()
File “/usr/lib/python3/dist-packages/six.py”, line 115, in _resolve
return _import_module(self.mod)
File “/usr/lib/python3/dist-packages/six.py”, line 82, in _import_module
import(name)
File “/usr/lib/python3.5/http/server.py”, line 628, in
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
File “/usr/lib/python3.5/http/server.py”, line 836, in SimpleHTTPRequestHandler
mimetypes.init() # try to read system mime.types
File “/usr/lib/python3.5/mimetypes.py”, line 353, in init
db.read(file)
File “/usr/lib/python3.5/mimetypes.py”, line 203, in read
self.readfp(fp, strict)
File “/usr/lib/python3.5/mimetypes.py”, line 214, in readfp
line = fp.readline()
File “/usr/lib/python3.5/codecs.py”, line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xbd in position 0: invalid start byte
2020-05-12 18:57:16,955:ERROR:certbot.log:An unexpected error occurred:

My web server is (include version): apache

The operating system my web server runs on is (include version): Ubuntu 16.04

My hosting provider, if applicable, is: self hosted

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

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

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

i use commnad find /etc/apache2 | grep -P ‘[^\x00-\x7f]’
sudo grep -r -P ‘[^\x00-\x7f]’ /etc/apache2 /etc/letsencrypt /etc/nginx**
but not result

Hi @tatmyanineu

looks like your list of mime types uses that character.

Where are your mime types defined? What’s the content of that list? Check the Apache documentation to find your defined mime types.

I don’t quite understand the question,
mime the module is active in the settings apache2
mime config locate /etc/mime.types

What’s the content of these files? May be there is a character Codepoint > 127.

Thanks! you are genius!

1 Like

What was the problem? Some of these UTF-8 problems are language specific, so it’s helpful to know some ru-details.

the problem in files mime.types,
there was an extra symbol
topic is closed

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