好的,我读了很多。有很多人有同样的问题,但所有答案对我都没有帮助。
我试图这样做 - http://googlecloudplatform.github.io/appengine-php-wordpress-starter-project/,但每次运行应用时,我都会收到相同的消息:
> 2014-09-22 10:12:10 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8090', 'C:\\gae\\wp39']"
INFO 2014-09-22 10:12:12,089 devappserver2.py:725] Skipping SDK update check.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 82, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 78, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 970, in <module>
main()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 963, in main
dev_server.start(options)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 768, in start
request_data, storage_path, options, configuration)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 867, in _create_api_server
default_gcs_bucket_name=options.default_gcs_bucket_name)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\api_server.py", line 364, in setup_stubs
auto_id_policy=datastore_auto_id_policy)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_sqlite_stub.py", line 604, in __init__
factory=sql_conn)
sqlite3.OperationalError: unable to open database file
2014-09-22 10:12:12 (Process exited with code 1)
Windows 8,Python27,GAE 1.9.11
同样的结果。
当我尝试从控制台运行带有属性&#34; - datastore_path C:\ temp \ data.db&#39; ,系统创建该文件(大约9KB),但仍然无法打开数据库。
文件夹&#34; C:\ Users \\ AppData \ Local \ Temp \ appengine.levalult&#34;存在,但空洞。我不知道还能做什么。
感谢。我会很感激任何建议。
答案 0 :(得分:1)
解:
将用户名更改为无Unicode或
将tmp
和temp
环境变量值更改为e:\
或
在cmd提示符下,执行:
更改env var
值
设置temp = e:\
设置tmp = e:\
2:跑gae
D:\Program Files (x86)\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe
原因:
在datastore_sqllite_stub.py
,
在def __init__
在self.__connection = sqlite3.connect:
添加以下代码:
f = open( 'e:/tmp/a.log', 'w' )
f.write( self.__datastore_file )
f.write( '\n' )
for name in os.environ.keys():
f.write( '\n' )
v = os.environ[name]
f.write( name )
f.write( ' ' )
f.write( v )
f.close()
self.__datastore_file = 'e:/tmp/datastore.db'
根据代码,数据库文件位于:
c:\users\%username%\appdata\local\temp\appengine.xgogo\datastore.db
等于:
%TEMP%\ appengine.xgogo\datastore.db
%Temp%
是环境变量。
当用户名具有Unicode字符时,make make。