使用应用引擎服务帐户时出现断开链接错误

2024-09-29 21:26:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我遵循这个教程

https://developers.google.com/bigquery/docs/authorization#service-accounts-appengine

这是我的主.py代码

^{pr2}$

这是我的应用程序yaml文件编码

application: bigquerymashup
version: 1
runtime: python
api_version: 1

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

- url: .*
  script: main.py

是的,我已经在googleapi控制台的团队标签中添加了appengine服务帐户名,具有编辑权限。 当上传应用程序并尝试访问链接时,会显示

Oops! This link appears to be broken.

以前我在本地运行了这个程序,并尝试使用链接localhost:8080访问它,然后我认为可能是本地运行的错误,所以我将代码上载到

http://bigquerymashup.appspot.com/

但这仍然是一个错误。在

编辑: 更新应用程序yaml在

application: bigquerymashup
version: 1
runtime: python
api_version: 1

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

- url: .*
  script: main.py

- url: /listdatasets
  script: main.py

但又犯了一个错误

Traceback (most recent call last): File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp2‌​5.py", line 710, in call handler.get(*groups) TypeError: get() takes exactly 1 argument (2 given) 

Tags: 代码pycom应用程序urlmainversion错误

热门问题