2013-02-20 51 views
2

我現在使用kay框架已經有一段時間了,但是自上次更新應用引擎以來,我無法管理上傳非純ASCII文件...Google應用引擎不再接受二進制文件上傳

我得到的錯誤是:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

這裏是完整的日誌:

MacBook-Pro-de-Erwann:scrollshowPROD diwann$ python manage.py appcfg update 
Running on Kay-2.0.0qa1 
Compiling templates... 
Now compiling templates in www/templates to www/templates_compiled. 
Now compiling templates in user/templates to user/templates_compiled. 
Now compiling templates in presentation/templates to presentation/templates_compiled. 
Now compiling templates in /Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/kay/auth/templates to /Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/kay/auth/templates_compiled. 
Now compiling templates in /Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/presentation/templates to /Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/presentation/templates_compiled. 
Now compiling templates in /Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/user/templates to /Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/user/templates_compiled. 
Now compiling templates in /Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/www/templates to /Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/www/templates_compiled. 
Finished compiling templates... 
02:36 AM Host: appengine.google.com 
02:36 AM Application: scrollshow; version: 1 
02:36 AM 
Starting update of app: scrollshow, version: 1 
02:36 AM Getting current resource limits. 
02:36 AM Scanning files on local disk. 
Could not guess mimetype for static/assets/themes/plimse/California beach/Repertoire temporaire pour combler un ancien nom de theme. Using application/octet-stream. 
02:37 AM Scanned 500 files. 
Could not guess mimetype for static/assets/themes/plimse/California beach/Repertoire temporaire pour combler un ancien nom de theme. Using application/octet-stream. 
02:37 AM Cloning 430 static files. 
02:37 AM Cloning 466 application files. 
02:37 AM Uploading 3 files and blobs. 
02:37 AM Missing File Path : static/assets/themes/plimse/textures/scrollViewTexturedBackgroundColor_web.jpg 
02:37 AM Missing File Path : static/assets/themes/plimse/textures/underPageBackgroundColor_web.jpg 
02:37 AM Missing File Path : static/media/js/scrollshowReader.js 
02:37 AM File Path : static/assets/themes/plimse/textures/scrollViewTexturedBackgroundColor_web.jpg 
ERROR:root:An unexpected error occurred. Aborting. 
Traceback (most recent call last): 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2302, in DoUpload 
    self.blob_batcher.Flush() 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1579, in Flush 
    self.SendBatch() 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1536, in SendBatch 
    payload, 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128) 
02:37 AM Rolling back the update. 
Traceback (most recent call last): 
    File "manage.py", line 24, in <module> 
    script.run() 
    File "/Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/kay/lib/werkzeug/script.py", line 121, in run 
    return func() 
    File "/Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/kay/management/appcfg.py", line 58, in do_appcfg_passthru_argv 
    result = app.Run() 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2688, in Run 
    self.action(self) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 4235, in __call__ 
    return method() 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 3247, in Update 
    self.UpdateVersion(rpcserver, self.basepath, appyaml, yaml_file_basename) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 3196, in UpdateVersion 
    return appversion.DoUpload(paths, openfunc) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 2302, in DoUpload 
    self.blob_batcher.Flush() 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1579, in Flush 
    self.SendBatch() 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 1536, in SendBatch 
    payload, 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128) 

注意「缺少文件路徑」的部分已經被自己加入到凱知道哪些文件造成了錯誤

首先,我的代碼的某些字符不再被允許,並且在我全部刪除它們之後,我成功將我的應用上傳到應用引擎。 但現在,我需要上傳一個圖像,它仍然抱怨它不是ASCII ... (這個日誌說它不能上傳文件「scrollViewTexturedBackgroundColor_web.jpg」,因爲第一個字符不是ascii)...

在kay或app引擎中是否有設置?

回答

1

我在kay用戶郵件列表上得到了答案。 他們說要直接使用google_appengine/appcfg.py。

注意:這裏是完整的命令行我做:

python /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/appcfg.py update .