Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.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
Python 谷歌应用程序引擎显示了很多204和我可以';我没有日志_Python_Google App Engine - Fatal编程技术网

Python 谷歌应用程序引擎显示了很多204和我可以';我没有日志

Python 谷歌应用程序引擎显示了很多204和我可以';我没有日志,python,google-app-engine,Python,Google App Engine,我正在用Python使用google应用程序引擎 我的很多用户都得到了返回码204(我可以在Stackdriver日志上看到) 它是同一个页面(返回一个来自数据存储的json),出于某种原因,有时它返回204(无内容),甚至认为存在有效内容 我尝试了…捕获了我的get方法,但它们从未被触发。 我有这样的日志行:logging.info(u'right in begging of method') 当返回码为204时,它们不会被打印出来 我在日志查看器中获得了此类条目: 179.236.114.1

我正在用Python使用google应用程序引擎 我的很多用户都得到了返回码204(我可以在Stackdriver日志上看到)

它是同一个页面(返回一个来自数据存储的json),出于某种原因,有时它返回204(无内容),甚至认为存在有效内容

我尝试了…捕获了我的get方法,但它们从未被触发。 我有这样的日志行:logging.info(u'right in begging of method') 当返回码为204时,它们不会被打印出来

我在日志查看器中获得了此类条目:

179.236.114.131---[04/Jan/2017:03:26:50+0000]“GET/querywg?date=2017-01-04&categoria=filme&app_type=free HTTP/1.1”204 117847-“okhttp/3.4.1”“gtvbrapp.guiatvbr.com.br”ms=19 cpu_ms=0 cpm_usd=0.000013170428加载_请求=0实例=- 应用程序引擎版本=1.9.48跟踪id=4c71730e72178c723437b2f196f44166

它们都有
实例=-
,而不是一个长数字

有什么想法吗

get()方法(和依赖项):

app.yaml:

application: some-invented-id
version: 7
runtime: python27
api_version: 1
instance_class: F2
threadsafe: true

env_variables:

handlers:
- url: /images
  static_dir: images

- url: /css
  static_dir: css

- url: /js
  static_dir: js

- url: /font
  static_dir: font

- url: /data
  static_dir: data
  mime_type: application/json

# Endpoints handler
- url: /_ah/spi/.*
  script: services.APPLICATION

- url: /robots.txt
  static_files: 1
  upload: robots.txt

- url: /.*
  script: mainpage.app
  secure: optional

builtins:
- deferred: on
- appstats: on
- remote_api: on

libraries:
- name: webapp2
  version: latest
- name: jinja2
  version: latest
- name: pycrypto
  version: latest
- name: endpoints
  version: 1.0

204表示您的文件由Google Edge cache缓存和处理,如果您不想缓存此资源,请设置http头
缓存控制:无缓存

204表示您的文件由Google Edge缓存和处理,如果您不希望缓存此资源,请设置http头
缓存控制:无缓存

可能会向我们显示您的
get()
方法?以及您的app.yaml?处理程序是否调用了正确的脚本?get方法和app.yaml我可以发布,但它们可以工作(我不知道次数的百分比,因为我不知道在仪表板中的何处可以找到它)。也许可以向我们展示您的
get()
方法?以及您的app.yaml?处理程序是否调用了正确的脚本?get方法和app.yaml我可以发布,但它们可以工作(我不知道次数的百分比,因为我不知道在仪表板中的何处可以找到它)。我在app.yaml中使用
expiration
default\u expiration
解决它失败,但我可以控制
缓存控制:public,max age=240
在app.yaml中显式设置
send_from_目录(app.static_文件夹,request.path[1],cache_timeout=240)
我无法通过
expiration
default_expiration
解决它,但我可以通过显式设置
send_from_目录控制
cache control:public,max age=240
(app.static_文件夹,request.path[1:],cache_timeout=240)
application: some-invented-id
version: 7
runtime: python27
api_version: 1
instance_class: F2
threadsafe: true

env_variables:

handlers:
- url: /images
  static_dir: images

- url: /css
  static_dir: css

- url: /js
  static_dir: js

- url: /font
  static_dir: font

- url: /data
  static_dir: data
  mime_type: application/json

# Endpoints handler
- url: /_ah/spi/.*
  script: services.APPLICATION

- url: /robots.txt
  static_files: 1
  upload: robots.txt

- url: /.*
  script: mainpage.app
  secure: optional

builtins:
- deferred: on
- appstats: on
- remote_api: on

libraries:
- name: webapp2
  version: latest
- name: jinja2
  version: latest
- name: pycrypto
  version: latest
- name: endpoints
  version: 1.0