简体   繁体   中英

Google AppEngine app.yaml error 500

I'm having problems getting my assets folder to upload to the root, but also allowing a custom url handler /cron to upload too.

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

As you can see, my backup script is also located in my assets or static folder. If I remove my static_dir: assets handler, my /cron handler works fine.

I also tried changing the url to /assets to see if I could overwrite it that way.

Any idea why this happens and how I can fix it?

You are defining the whole assets directory as static with static_dir: assets . You can't run any script inside a static_dir. The fix is to move assets/backup/main.py to outside the directory defined as static_dir.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM