Не импортируется SimpleHTTPServer

40 views
Skip to first unread message

Andrey

unread,
Aug 30, 2011, 6:15:47 PM8/30/11
to Пишем на Python лучше
Приветствую!

В 2.7.1/2.7.2 ошибка импорта под Win7 x32 / SP1

>>> 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)

Есть идеи?

Sergey Schetinin

unread,
Aug 30, 2011, 6:18:13 PM8/30/11
to better-p...@googlegroups.com
mimetypes на винде берет часть данных из реестра, видать там попалось
что-то неудобоваримое. Неплохо бы выяснить чем именно там mimtypes
подавился и сделать репорт вот сюда: http://bugs.python.org/

2011/8/31 Andrey <mena...@gmail.com>:

> --
> Группа: http://groups.google.com/group/better-python-ru
> Отписка: better-python-...@googlegroups.com

--
http://self.maluke.com/

Reply all
Reply to author
Forward
0 new messages