Google app engine Google AppEngine app.yaml错误500

Google app engine Google AppEngine app.yaml错误500,google-app-engine,yaml,handler,Google App Engine,Yaml,Handler,我在将资产文件夹上载到根目录时遇到问题,但同时也允许自定义url处理程序/cron上载 application: appname version: 1 runtime: python api_version: 1 handlers: - url: /cron script: assets/backup/main.py - url: / static_files: assets/index.html upload: assets/index.html - url: / sta

我在将资产文件夹上载到根目录时遇到问题,但同时也允许自定义url处理程序
/cron
上载

application: appname
version: 1
runtime: python
api_version: 1

handlers:
- url: /cron
  script: assets/backup/main.py

- url: /
  static_files: assets/index.html
  upload: assets/index.html

- url: /
  static_dir: assets
如您所见,我的备份脚本也位于我的资产或静态文件夹中。如果删除我的
static\u dir:assets
处理程序,我的
/cron
处理程序工作正常

我还尝试将
url
更改为
/assets
,看看是否可以这样覆盖它


知道为什么会发生这种情况以及我如何修复它吗?

您正在使用
static\u dir:assets
将整个assets目录定义为static。不能在静态目录中运行任何脚本。修复方法是将
assets/backup/main.py
移动到定义为static\u dir的目录之外。

Perfect!谢谢你,莫里斯。这一切都有道理,脚本不是静态内容!