Google应用引擎不再接受二进制文件上传 [英] Google app engine not accepting binary file upload anymore

查看:98
本文介绍了Google应用引擎不再接受二进制文件上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在使用kay框架的时间已经很长一段时间了,但自上次更新应用引擎以来,我无法管理上传非纯ASCII文件......



我得到的错误是:


UnicodeDecodeError:'ascii'编解码器无法在位置0解码字节0xff:ordinal not (128)


这里是完整的日志:

  MacBook-Pro-de-Erwann:scrollshowPROD diwann $ python manage.py appcfg更新
在Kay-2.0.0qa1上运行
编译模板...
现在将www / templates中的模板编译为www / templates_compiled。
现在将用户/模板中的模板编译为user / templates_compiled。
现在将presentation / templates中的模板编译为presentation / templates_compiled。
现在编辑/ Users / diwann / Source / scrollshow / scrollshow-web / lexman / scrollshowPROD / kay / auth / templates中的模板到/ Users / diwann / Source / scrollshow / scrollshow-web / lexman / scrollshowPROD / kay / AUTH / templates_compiled。
现在将/ Users / diwann / Source / scrollshow / scrollshow-web / lexman / scrollshowPROD / presentation / templates中的模板编译到/ Users / diwann / Source / scrollshow / scrollshow-web / lexman / scrollshowPROD / presentation / templates_compiled。
现在将模板编译到/ Users / diwann / Source / scrollshow / scrollshow-web / lexman / scrollshowPROD / user /
现在将/ Users / diwann / Source / scrollshow / scrollshow-web / lexman / scrollshowPROD / www / templates中的模板编译到/ Users / diwann / Source / scrollshow / scrollshow-web / lexman / scrollshowPROD / www / templates_compiled。
完成编译模板...
02:36 AM主持人:appengine.google.com
02:36 AM应用程序:scrollshow;版本:1
02:36 AM
开始更新应用程序:scrollshow,版本:1
02:36 AM获取当前资源限制。
02:36 AM扫描本地磁盘上的文件。
无法为static / assets / themes / plimse / California海滩/ Repertoire temporaire pour combler un ancien nom de主题猜测mimetype。使用应用程序/八位字节流。
02:37 AM扫描了500个文件。
无法为static / assets / themes / plimse / California海滩/ Repertoire temporaire pour combler un ancien nom de主题猜测mimetype。使用应用程序/八位字节流。
02:37 AM克隆430个静态文件。
02:37 AM克隆466个应用程序文件。
02:37 AM上传3个文件和blob。
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文件路径:static / assets / themes / plimse / textures / scrollViewTexturedBackgroundColor_web.jpg
ERROR :root:发生意外错误。中止。
Traceback(最近一次调用最后):
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py ,第2302行,在DoUpload
self.blob_batcher.Flush()
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine /tools/appcfg.py,第1579行,在Flush
self.SendBatch()
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine /google/appengine/tools/appcfg.py,第1536行,在SendBatch
有效内容中,
UnicodeDecodeError:'ascii'编解码器无法解码位置0中的字节0xff:序号不在范围内(128)
02:37 AM回滚更新。
Traceback(最近一次调用最后一次):
在< module>文件中的第24行manage.py
script.run()
文件/Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/kay/lib/werkzeug/script.py,第121行,运行
返回func()
文件/Users/diwann/Source/scrollshow/scrollshow-web/lexman/scrollshowPROD/kay/management/appcfg.py,第58行,在do_appcfg_passthru_argv
result = app中.Run()
运行$中的文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py,第2688行b $ b self.action(self)
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py,行4235,位于__call__
return method()
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py ,第3247行,更新
sel f.UpdateVersion(rpcserver,self.basepath,appyaml,yaml_file_basename)
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg .py,第3196行,在UpdateVersion中
返回appversion.DoUpload(路径,openfunc)
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine /google/appengine/tools/appcfg.py,行2302,位于DoUpload
self.blob_batcher.Flush()
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle /Contents/Resources/google_appengine/google/appengine/tools/appcfg.py,第1579行,刷新
self.SendBatch()
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine -default.bundle / Contents / Resources / google_appengine / google / appengine / tools / appcfg.py,第1536行,在SendBatch中
有效载荷,
UnicodeDecodeError:'ascii'编解码器无法解码位置0中的字节0xff:序号不在范围内(128)

请注意,缺少文件路径部分已由我自己添加到凯伊以知道哪些文件导致错误



<首先看到我的代码的一些字符不再被允许,并且在我全部删除它们之后,我成功地将我的应用程序上传到应用程序引擎。
但现在,我需要上传一张图片,它仍然抱怨它不是ASCII ...
(这个日志说它不能上传文件scrollViewTexturedBackgroundColor_web.jpg,因为第一个字符不是ascii)...


有没有在kay或app引擎中设置的东西?

解决方案

我在kay用户邮件列表上得到了答案。
他们表示直接使用google_appengine / appcfg.py。



注意:这里是我完成的命令行:


python /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/appcfg.py更新。



I am using the kay framework for quite a while now but, since the last time I updated app engine, I can't manage to upload non pure ASCII files ...

the error I got is :

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

here is the full log :

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)

Note that the "Missing File Path" part have been added by myself to kay to know which files caused the error

It appears first that some caracters of my code were not allowed anymore and after I removed them all, I succeed to upload my app to app engine. But now, I need to upload an image, and it still complains it's not ASCII ... (this log says that it can not upload the file "scrollViewTexturedBackgroundColor_web.jpg" because the first caracter is not ascii) ...

Is there something to set up in kay or app engine ?

解决方案

I got the answer on kay user mailing list. They said to use google_appengine/appcfg.py directly.

NB : here is the full command line I did :

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

这篇关于Google应用引擎不再接受二进制文件上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆