I'm writing for the Google App Engine and my local tests are getting the following error:
--> --> -->
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3185, in _HandleRequest
self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3128, in _Dispatch
base_env_dict=env_dict)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 515, in Dispatch
base_env_dict=base_env_dict)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2387, in Dispatch
self._module_dict)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2297, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2193, in ExecuteOrImportScript
exec module_code in script_module.__dict__
File "C:\Users\Chris Reade\Documents\SI 182\Final\geneticsalesman\Final.py", line 7, in <module>
from pyevolve import DBAdapters
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1922, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1824, in FindAndLoadModule
description)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1775, in LoadModuleRestricted
description)
File "C:\Users\Chris Reade\Documents\SI 182\Final\geneticsalesman\pyevolve\DBAdapters.py", line 21, in <module>
import sqlite3
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1922, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1824, in FindAndLoadModule
description)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1775, in LoadModuleRestricted
description)
File "C:\Python26\lib\sqlite3\__init__.py", line 24, in <module>
from dbapi2 import *
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1922, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1824, in FindAndLoadModule
description)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate
return func(self, *args, **kwargs)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1775, in LoadModuleRestricted
description)
File "C:\Python26\lib\sqlite3\dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3
My python direction has a lib file for sqlite3 but I can't tell why it can't find it. Any help would be greatly appreciated.
The App Engine SDK tries hard to give you errors on any module imports that would fail on the real App Engine (on Google's servers). SQlite is not supported on the latter, so giving you errors is just the SDK's nice way of saying "you won't be able to deploy this code on the real Google App Engine servers"!