I am still having the same problem. The guest book functions fine, so
it can't be my install. This is just the hello world app, and I've
typed, retyped, copy and pasted and checked every space, etc I could
find. No dice.
Here what my server output looks like (if that helps):
<type 'exceptions.SyntaxError'> Python 2.5.1: /System/Library/
Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/
MacOS/Python
Mon May 5 00:37:12 2008
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/usr/local/google_appengine/google/appengine/tools/dev_appserver.py
in
_HandleRequest(self=<google.appengine.tools.dev_appserver.DevAppServerRequestHandler
instance at 0x12159b8>)
2245 infile,
2246 outfile,
2247 base_env_dict=env_dict)
2248 finally:
2249
self.module_manager.UpdateModuleFileModificationTimes()
base_env_dict undefined, env_dict = {'REMOTE_ADDR': '127.0.0.1',
'REQUEST_METHOD': 'GET', 'SERVER_NAME': 'localhost', 'SERVER_PORT':
'8080', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/
1.0'}
/usr/local/google_appengine/google/appengine/tools/dev_appserver.py
in
Dispatch(self=<google.appengine.tools.dev_appserver.MatcherDispatcher
object at 0x1213fd0>, relative_url='/', path=None,
headers=<mimetools.Message instance at 0x12155f8>,
infile=<cStringIO.StringI object at 0x52aec0>,
outfile=<cStringIO.StringO object at 0x1213260>,
base_env_dict={'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET',
'SERVER_NAME': 'localhost', 'SERVER_PORT': '8080', 'SERVER_PROTOCOL':
'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/1.0'})
332 infile,
333 outfile,
334 base_env_dict=base_env_dict)
335
336 return
base_env_dict = {'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET',
'SERVER_NAME': 'localhost', 'SERVER_PORT': '8080', 'SERVER_PROTOCOL':
'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/1.0'}
/usr/local/google_appengine/google/appengine/tools/dev_appserver.py
in Dispatch(self=<google.appengine.tools.dev_appserver.CGIDispatcher
object at 0x1213db0>, relative_url='/', path='helloworld.py',
headers=<mimetools.Message instance at 0x12155f8>,
infile=<cStringIO.StringI object at 0x52aec0>,
outfile=<cStringIO.StringO object at 0x1213260>,
base_env_dict={'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET',
'SERVER_NAME': 'localhost', 'SERVER_PORT': '8080', 'SERVER_PROTOCOL':
'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/1.0'})
1741 infile,
1742 outfile,
1743 self._module_dict)
1744 handler.AddDebuggingConsole(relative_url, env, outfile)
1745 finally:
self = <google.appengine.tools.dev_appserver.CGIDispatcher object at
0x1213db0>, self._module_dict = {'codecs': <module 'codecs' from '/
System/Library/Framework...framework/Versions/2.5/lib/python2.5/
codecs.pyc'>, 'encodings': <module 'encodings' from '/System/Library/
Framew...rsions/2.5/lib/python2.5/encodings/__init__.pyc'>,
'encodings.aliases': <module 'encodings.aliases' from '/System/
Librar...ersions/2.5/lib/python2.5/encodings/aliases.pyc'>,
'encodings.ascii': <module 'encodings.ascii' from '/System/Library/.../
Versions/2.5/lib/python2.5/encodings/ascii.pyc'>, 'encodings.utf_8':
<module 'encodings.utf_8' from '/System/Library/.../Versions/2.5/lib/
python2.5/encodings/utf_8.pyc'>, 'google': <module 'google' from '/usr/
local/google_appengine/google/__init__.pyc'>, 'google.appengine':
<module 'google.appengine' from '/usr/local/google_appengine/google/
appengine/__init__.pyc'>, 'google.appengine.api': <module
'google.appengine.api' from '/usr/local/google_appengine/google/
appengine/api/__init__.pyc'>, 'google.appengine.api.api_base_pb':
<module 'google.appengine.api.api_base_pb' from ..._appengine/google/
appengine/api/api_base_pb.pyc'>,
'google.appengine.api.apiproxy_stub_map': <module
'google.appengine.api.apiproxy_stub_map'...gine/google/appengine/api/
apiproxy_stub_map.pyc'>, ...}
/usr/local/google_appengine/google/appengine/tools/dev_appserver.py
in ExecuteCGI(root_path='/Users/nathanziarek/Source/helloworld',
handler_path='helloworld.py', cgi_path='/Users/nathanziarek/Source/
helloworld/helloworld.py', env={'AUTH_DOMAIN': '
gmail.com',
'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'application/x-www-form-
urlencoded', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/
xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/
plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_ENCODING': 'gzip,
deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us', 'HTTP_CACHE_CONTROL': 'max-
age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'localhost:
8080', ...}, infile=<cStringIO.StringI object at 0x52aec0>,
outfile=<cStringIO.StringO object at 0x1213260>,
module_dict={'codecs': <module 'codecs' from '/System/Library/
Framework...framework/Versions/2.5/lib/python2.5/codecs.pyc'>,
'encodings': <module 'encodings' from '/System/Library/Framew...rsions/
2.5/lib/python2.5/encodings/__init__.pyc'>, 'encodings.aliases':
<module 'encodings.aliases' from '/System/Librar...ersions/2.5/lib/
python2.5/encodings/aliases.pyc'>, 'encodings.ascii': <module
'encodings.ascii' from '/System/Library/.../Versions/2.5/lib/python2.5/
encodings/ascii.pyc'>, 'encodings.utf_8': <module 'encodings.utf_8'
from '/System/Library/.../Versions/2.5/lib/python2.5/encodings/
utf_8.pyc'>, 'google': <module 'google' from '/usr/local/
google_appengine/google/__init__.pyc'>, 'google.appengine': <module
'google.appengine' from '/usr/local/google_appengine/google/appengine/
__init__.pyc'>, 'google.appengine.api': <module 'google.appengine.api'
from '/usr/local/google_appengine/google/appengine/api/__init__.pyc'>,
'google.appengine.api.api_base_pb': <module
'google.appengine.api.api_base_pb' from ..._appengine/google/appengine/
api/api_base_pb.pyc'>, 'google.appengine.api.apiproxy_stub_map':
<module 'google.appengine.api.apiproxy_stub_map'...gine/google/
appengine/api/apiproxy_stub_map.pyc'>, ...}, exec_script=<function
ExecuteOrImportScript at 0x6c6970>)
1652 logging.debug('Executing CGI with env:\n%s',
pprint.pformat(env))
1653 try:
1654 reset_modules = exec_script(handler_path, cgi_path, hook)
1655 except SystemExit, e:
1656 logging.debug('CGI exited with status: %s', e)
reset_modules = True, exec_script = <function ExecuteOrImportScript at
0x6c6970>, handler_path = 'helloworld.py', cgi_path = '/Users/
nathanziarek/Source/helloworld/helloworld.py', hook =
<google.appengine.tools.dev_appserver.HardenedModulesHook object at
0x6dfb90>
/usr/local/google_appengine/google/appengine/tools/dev_appserver.py
in ExecuteOrImportScript(handler_path='helloworld.py', cgi_path='/
Users/nathanziarek/Source/helloworld/helloworld.py',
import_hook=<google.appengine.tools.dev_appserver.HardenedModulesHook
object at 0x6dfb90>)
1548 """
1549 module_fullname, script_module, module_code =
LoadTargetModule(
1550 handler_path, cgi_path, import_hook)
1551 script_module.__name__ = '__main__'
1552 sys.modules['__main__'] = script_module
handler_path = 'helloworld.py', cgi_path = '/Users/nathanziarek/Source/
helloworld/helloworld.py', import_hook =
<google.appengine.tools.dev_appserver.HardenedModulesHook object at
0x6dfb90>
/usr/local/google_appengine/google/appengine/tools/dev_appserver.py
in LoadTargetModule(handler_path='helloworld.py', cgi_path='/Users/
nathanziarek/Source/helloworld/helloworld.py',
import_hook=<google.appengine.tools.dev_appserver.HardenedModulesHook
object at 0x6dfb90>, module_dict={'BaseHTTPServer': <module
'BaseHTTPServer' from '/System/Library/F...k/Versions/2.5/lib/
python2.5/BaseHTTPServer.pyc'>, 'Carbon': <module 'Carbon' from '/
System/Library/Framework.../2.5/lib/python2.5/plat-mac/Carbon/
__init__.pyc'>, 'Carbon.File': <module 'Carbon.File' from '/System/
Library/Fram...ions/2.5/lib/python2.5/plat-mac/Carbon/File.pyc'>,
'Carbon.Files': <module 'Carbon.Files' from '/System/Library/Fra...ons/
2.5/lib/python2.5/plat-mac/Carbon/Files.pyc'>, 'Carbon.Res': <module
'Carbon.Res' from '/System/Library/Frame...sions/2.5/lib/python2.5/
plat-mac/Carbon/Res.pyc'>, 'Carbon._File': None, 'Carbon._Res': None,
'Carbon.warnings': None, 'Cookie': <module 'Cookie' from '/System/
Library/Framework...framework/Versions/2.5/lib/python2.5/Cookie.pyc'>,
'MacOS': <module 'MacOS' from '/System/Library/Frameworks...Versions/
2.5/lib/python2.5/lib-dynload/MacOS.so'>, ...})
1506 source_file = open(cgi_path)
1507 try:
1508 module_code = compile(source_file.read(), cgi_path,
'exec')
1509 script_module.__file__ = cgi_path
1510 finally:
module_code = None, builtin compile = <built-in function compile>,
source_file = <closed file '/Users/nathanziarek/Source/helloworld/
helloworld.py', mode 'r' at 0x7e3a80>, source_file.read = <built-in
method read of FakeFile object at 0x7e3a80>, cgi_path = '/Users/
nathanziarek/Source/helloworld/helloworld.py'
<type 'exceptions.SyntaxError'>: invalid syntax (helloworld.py, line 1)