gpt4 book ai didi

python - appcfg.py upload_data 在 Windows 上忽略 --oauth2 选项

转载 作者:太空宇宙 更新时间:2023-11-03 18:00:59 27 4
gpt4 key购买 nike

我正在尝试使用 --oauth2 选项从 Windows 7 PC 上传 appengine 应用程序的数据。它提示我输入失败的凭据。

D:\>appcfg.py --oauth2 --filename=dump.dump upload_data myApp/
10:07 PM Application: myApp
10:07 PM Uploading data records.
[INFO ] Logging to bulkloader-log-20141228.220722
[INFO ] Throttling transfers:
[INFO ] Bandwidth: 250000 bytes/second
[INFO ] HTTP connections: 8/second
[INFO ] Entities inserted/fetched/modified: 20/second
[INFO ] Batch Size: 10
[INFO ] Opening database: bulkloader-progress-20141228.220722.sql3
[INFO ] Connecting to myApp.appspot.com/remote_api
Please enter login credentials for myApp.appspot.com
Email: myEmail@gmail.com
Password for myEmail@gmail.com:
Invalid username or password.

但是我希望它不会询问我有关电子邮件的信息,就像更新期间发生的那样:

D:\>appcfg.py --oauth2 update myApp/
10:06 PM Application: myApp; version: 1
10:06 PM Host: appengine.google.com
10:06 PM
Starting update of app: myApp, version: 1
10:06 PM Getting current resource limits.
10:06 PM Scanning files on local disk.
10:06 PM Cloning 1 static file.
10:06 PM Cloning 10 application files.
10:06 PM Compilation starting.
10:06 PM Compilation completed.
10:06 PM Starting deployment.
10:06 PM Checking if deployment succeeded.
10:06 PM Deployment successful.
10:06 PM Checking if updated app version is serving.
10:07 PM Completed update of app: myApp, version: 1
10:07 PM Uploading index definitions.

upload_data 期间 --oauth2 有什么问题?如果需要,我的 app.yaml 文件如下所示:

application: myApp
version: 1
runtime: python27
api_version: 1
threadsafe: no

handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico

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

- url: .*
script: main.app

libraries:
- name: webapp2
version: "2.5.2"
- name: jinja2
version: "2.6"

最佳答案

您需要更换线路

script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py

(根据“自定义 URL”处的 https://cloud.google.com/appengine/docs/python/tools/remoteapi):

script: google.appengine.ext.remote_api.handler.application

因为您根据 app.yaml 文件中的 runtime: 使用 Python 2.7。

关于python - appcfg.py upload_data 在 Windows 上忽略 --oauth2 选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27679854/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com