我是一位相对较新的GAE开发人员,我使用jinja2模板框架成功运行了应用程序。
我的/ images子文件夹中已有现有文件(主要是favicon.ico,我已经在其中一个html页面中用作静态图像的徽标,以及iosicon.png,我将其链接到html文件(使用Apple指定的代码)作为用户将我的webapp添加到iOS主屏幕时使用的默认图像。)使用这些图像文件时没有问题。
我的问题:我想编辑iosicon.png来调整大小并裁剪一下。我使用photoshop完成了这项工作,并且在我的本地目录中覆盖了现有文件,而没有重命名。
现在,我希望使用此更新的图像文件部署更新的应用程序。但是,我无法部署。我收到一个奇怪的错误,如下所述。
2014-06-21 18:11:07 Running command: "['C:\\Python27\\python.exe', '-u', 'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=i.peech@gmail.com', '--passin', 'update', 'C:\\Dropbox\\GIT\\Ambienators\\ambienators-ipeech2\\ambienators-ipeech2']"
06:11 PM Application: ambienators-ipeech2; version: 1
06:11 PM Host: appengine.google.com
06:11 PM
Starting update of app: ambienators-ipeech2, version: 1
06:11 PM Getting current resource limits.
Password for i.peech@gmail.com: 06:11 PM Scanning files on local disk.
Could not guess mimetype for bootstrap/fonts/glyphicons-halflings-regular.eot. Using application/octet-stream.
Could not guess mimetype for bootstrap/fonts/glyphicons-halflings-regular.ttf. Using application/octet-stream.
Could not guess mimetype for bootstrap/fonts/glyphicons-halflings-regular.woff. Using application/octet-stream.
Could not guess mimetype for bootstrap/css/bootstrap-theme.css.map. Using application/octet-stream.
Could not guess mimetype for bootstrap/css/bootstrap.css.map. Using application/octet-stream.
Could not guess mimetype for bootstrap/fonts/glyphicons-halflings-regular.ttf. Using application/octet-stream.
Could not guess mimetype for bootstrap/css/bootstrap-theme.css.map. Using application/octet-stream.
Could not guess mimetype for bootstrap/css/bootstrap.css.map. Using application/octet-stream.
Could not guess mimetype for bootstrap/fonts/glyphicons-halflings-regular.eot. Using application/octet-stream.
Could not guess mimetype for bootstrap/fonts/glyphicons-halflings-regular.woff. Using application/octet-stream.
06:11 PM Cloning 17 static files.
06:11 PM Cloning 11 application files.
06:11 PM Uploading 1 files and blobs.
2014-06-21 18:11:14,457 ERROR appcfg.py:2488 An unexpected error occurred. Aborting.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2329, in DoUpload
self._UploadMissingFiles(missing_files, openfunc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2467, in _UploadMissingFiles
self.blob_batcher.Flush()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1402, in Flush
self.SendBatch()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1361, in SendBatch
payload,
UnicodeDecodeError: 'ascii' codec can't decode byte 0x89 in position 0: ordinal not in range(128)
06:11 PM Rolling back the update.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 126, in <module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 122, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5220, in <module>
main(sys.argv)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5211, in main
result = AppCfgApp(argv).Run()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2886, in Run
self.action(self)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4890, in __call__
return method()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3682, in Update
self._UpdateWithParsedAppYaml(appyaml, self.basepath)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3735, in _UpdateWithParsedAppYaml
self.UpdateVersion(rpcserver, basepath, appyaml, APP_YAML_FILENAME)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3618, in UpdateVersion
return appversion.DoUpload(paths, openfunc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2329, in DoUpload
self._UploadMissingFiles(missing_files, openfunc)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2467, in _UploadMissingFiles
self.blob_batcher.Flush()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1402, in Flush
self.SendBatch()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 1361, in SendBatch
payload,
UnicodeDecodeError: 'ascii' codec can't decode byte 0x89 in position 0: ordinal not in range(128)
2014-06-21 18:11:15 (Process exited with code 1)
You can close this window now.
为了澄清,我100%确定这个新的png文件导致错误。我试图恢复以前的png文件。错误消失,部署成功完成。当我复制现有的png文件时,部署也成功完成。只有当我添加新的png文件时才会出现这个问题(即使它们与以前存在的文件具有相同的文件名)。
我在这里做错了吗?我错过了关键的一步吗?
先谢谢了!