Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更新GAE python应用程序的问题_Python_Django_Google App Engine - Fatal编程技术网

更新GAE python应用程序的问题

更新GAE python应用程序的问题,python,django,google-app-engine,Python,Django,Google App Engine,使用以下命令将我的应用程序更新到GAE时: python appcfg.py update/home/tom/workspace/DjangoProject 我收到一条错误消息: mapping values are not allowed here in "/home/tom/workspace/DjangoProject/app.yaml", line 6, column 9 这是我的yaml: application:myapp version:1 runtime:python ap

使用以下命令将我的应用程序更新到GAE时: python appcfg.py update/home/tom/workspace/DjangoProject

我收到一条错误消息:

mapping values are not allowed here
  in "/home/tom/workspace/DjangoProject/app.yaml", line 6, column 9
这是我的yaml:

application:myapp
version:1
runtime:python
api_version:1

handlers:
- url:/
  script:home.py

- url:/index\.html
  script: home.py

- url: /stylesheets
  static_dir: stylesheets

- url: /(.*\.(gif|png|jpg))
  static_files: static/\1
  upload: static/(.*\.(gif|png|jpg))

- url: /admin/.*
  script: admin.py
  login: admin

- url: /.*
  script: not_found.py
有人能帮我吗

我改变了我的yaml:

application:myapp
version:1
runtime:python
api_version:1
handlers
- url:/
  script:home.py
- url:/index\.html
  script:home.py
- url:/stylesheets
  static_dir:stylesheets
- url:/(.*\.(gif|png|jpg))
  static_files:static/\1
  upload:static/(.*\.(gif|png|jpg))
- url:/admin/.*
  script:admin.py
  login:admin
- url:/.*
  script:not_found.py
现在的错误是:


google.appengine.api.appinfo_errors.MissingURLMapping:在应用程序配置中找不到URLMap条目

冒号后必须有空格。这就是为什么它无法解析你的app.yaml。 试试这个


我想您需要在冒号
-url://
-url:/index\.html
后加空格。您更改了
app.yaml
。。。并删除所有空格,而不是添加它们。
application: myapp
version: 1
runtime: python
api_version: 1

handlers:
- url: /
  script: home.py

- url: /index\.html
  script: home.py

- url: /stylesheets
  static_dir: stylesheets

- url: /(.*\.(gif|png|jpg))
  static_files: static/\1
  upload: static/(.*\.(gif|png|jpg))

- url: /admin/.*
  script: admin.py
  login: admin

- url: /.*
  script: not_found.py