2012-06-09 78 views
6

我試圖按照這個解釋下載數據: https://developers.google.com/appengine/docs/python/tools/uploadingdata#Downloading_and_Uploading_All_Data從AppEngine上

但是當我添加到我的app.yaml:

- url: /remote_api 
    script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py 
    login: admin 

,並試圖更新我的應用程序,我得到:

錯誤解析YAML文件:無效的對象:線程無法啓用 與CGI處理程序: $ PYTHON_LIB /谷歌/ AppEngine上/轉/ remote_api的/handler.py

錯誤。

我在做什麼錯了?

謝謝!

順便說一句,這是我的app.yaml:

application: XXXX-my-application-name 
version: 1 
runtime: python27 
api_version: 1 
threadsafe: true 

handlers: 
- url: /static 
    static_dir: static 

- url: /remote_api 
    script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py 
    login: admin 

- url: /favicon.ico 
    static_files: static/favicon.ico 
    upload: static/favicon.ico 

- url: /.* 
    script: main.app # a WSGI application in the main module's global scope 

libraries: 
- name: django 
    version: "1.3" 

回答

13

試着這麼做

- url: /remote_api 
    script: google.appengine.ext.remote_api.handler.application 
    login: admin 

它將使用的WSGI應用程序而不是在main()方法CGI風格。

+0

謝謝!有用。 – Erez

5

除非你正在做的事情非常特別,你不應該改變遠程URL。

只是把在app.yaml中的以下內容:

builtins: 
- remote_api: on