import web
urls = (
'/', 'index'
)
app = web.application (urls, globals ())
class index:
def GET (self):
greeting= "Hello, World"
return greeting
if __name__ == "__main__":
app.run ()
D:\#Web\Projects\gothonweb\bin>python app.py
Traceback (most recent call last):
File "app.py", line 1, in <module>
import web
File "D:\#Web\Python27\lib\site-packages\web\__init__.py", line 14, in <module>
import utils, db, net, wsgi, http, webapi, httpserver, debugerror
File "D:\#Web\Python27\lib\site-packages\web\wsgi.py", line 12, in <module>
import httpserver
File "D:\#Web\Python27\lib\site-packages\web\httpserver.py", line 4, in <module>
from SimpleHTTPServer import SimpleHTTPRequestHandler
File "D:\#Web\Python27\lib\SimpleHTTPServer.py", line 27, in <module>
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
File "D:\#Web\Python27\lib\SimpleHTTPServer.py", line 204, in SimpleHTTPRequestHandler
mimetypes.init() # try to read system mime.types
File "D:\#Web\Python27\lib\mimetypes.py", line 355, in init
db.read_windows_registry()
File "D:\#Web\Python27\lib\mimetypes.py", line 259, in read_windows_registry
for ctype in enum_types(mimedb):
File "D:\#Web\Python27\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)
Что делать?