This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: import SimpleHTTPServer
Type: resource usage Stage:
Components: Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: mimetypes initialization fails on Windows because of non-Latin characters in registry
View: 9291
Assigned To: Nosy List: Andrey.Men, amaury.forgeotdarc
Priority: normal Keywords:

Created on 2011-08-30 22:35 by Andrey.Men, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg143238 - (view) Author: Andrey Men (Andrey.Men) Date: 2011-08-30 22:35
In russian windows seven SP1, x32, installed from 2.7.1/2.7.2 MSI installer:

>>> import SimpleHTTPServer

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import SimpleHTTPServer
  File "C:\Python\lib\SimpleHTTPServer.py", line 27, in <module>
    class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
  File "C:\Python\lib\SimpleHTTPServer.py", line 204, in SimpleHTTPRequestHandler
    mimetypes.init() # try to read system mime.types
  File "C:\Python\lib\mimetypes.py", line 355, in init
    db.read_windows_registry()
  File "C:\Python\lib\mimetypes.py", line 259, in read_windows_registry
    for ctype in enum_types(mimedb):
  File "C:\Python\lib\mimetypes.py", line 249, in enum_types
    ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)
msg143240 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2011-08-30 22:53
This is a duplicate of issue9291.
History
Date User Action Args
2022-04-11 14:57:21adminsetgithub: 57074
2011-08-30 22:53:16amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg143240

superseder: mimetypes initialization fails on Windows because of non-Latin characters in registry
resolution: duplicate
2011-08-30 22:35:12Andrey.Mencreate