Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Google app engine web server on Windows correct?

I tried to run Google App Engine development server using Python 3.2 and Python 2.7, got errors on both:

Python 2.7:

D:\nCdy\WA>C:\Python27\python.exe "D:\Program Files\Google\google_appengine\dev_
appserver.py" wa.py
Traceback (most recent call last):
  File "D:\Program Files\Google\google_appengine\dev_appserver.py", line 76, in
<module>
    run_file(__file__, globals())
  File "D:\Program Files\Google\google_appengine\dev_appserver.py", line 72, in
run_file
    execfile(script_path, globals_)
  File "D:\Program Files\Google\google_appengine\google\appengine\tools\dev_apps
erver_main.py", line 156, in <module>
    from google.appengine.tools import dev_appserver
  File "D:\Program Files\Google\google_appengine\google\appengine\tools\dev_apps
erver.py", line 179, in <module>
    mimetypes.add_type(mime_type, '.' + ext)
  File "C:\Python27\lib\mimetypes.py", line 344, in add_type
    init()
  File "C:\Python27\lib\mimetypes.py", line 355, in init
    db.read_windows_registry()
  File "C:\Python27\lib\mimetypes.py", line 259, in read_windows_registry
    for ctype in enum_types(mimedb):
  File "C:\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)

Python 3.2:

D:\nCdy\WA>C:\Python32\python.exe "D:\Program Files\Google\google_appengine\dev_
appserver.py" wa.py
Traceback (most recent call last):
  File "D:\Program Files\Google\google_appengine\dev_appserver.py", line 76, in
<module>
    run_file(__file__, globals())
  File "D:\Program Files\Google\google_appengine\dev_appserver.py", line 72, in
run_file
    execfile(script_path, globals_)
NameError: global name 'execfile' is not defined 

How do I run it?

like image 519
cnd Avatar asked Dec 27 '22 15:12

cnd


1 Answers

It won't work with Python 3.2.

I've had no trouble with GAE and Python 2.7 on Windows 7. It will soon be the officially supported version.

Right now, the officially supported version is Python 2.5, so you should download that if you have any problems getting other versions to work.

I'd suggest something like ActiveState since there are no official binaries for the latest version of Python 2.5.

like image 90
agf Avatar answered Dec 31 '22 13:12

agf