Google app engine 有人能纠正我的app.yaml和cron.yaml吗?谷歌云平台

Google app engine 有人能纠正我的app.yaml和cron.yaml吗?谷歌云平台,google-app-engine,cron,repository,google-cloud-platform,app.yaml,Google App Engine,Cron,Repository,Google Cloud Platform,App.yaml,我有一个python代码scrape.py,我想在app engine上运行它,它存储在我的存储库中,库都在文件夹lib中 有人能纠正我的app.yaml和cron.yaml吗 我的进口 import requests import re import mysql.connector from urlparse import urlparse from urlparse import urljoin from bs4 import BeautifulSoup app.yaml runtime:

我有一个python代码
scrape.py
,我想在app engine上运行它,它存储在我的存储库中,库都在文件夹
lib

有人能纠正我的app.yaml和cron.yaml吗

我的进口

import requests
import re
import mysql.connector
from urlparse import urlparse
from urlparse import urljoin
from bs4 import BeautifulSoup
app.yaml

runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /
  script: Scrape.app

handlers:
- url: /lib/requests
  script: Scrape.app

handlers:
- url: /requests
  script: Scrape.app

handlers:
- url: /mysql/connector
  script: Scrape.app

handlers:
- url: /bs4/
  script: Scrape.app
处理程序: -url:/lib/mysql/connector 脚本:Scrape.app

handlers:
- url: /lib/bs4/
  script: Scrape.app
克朗·亚姆

cron:
- description: "Scrape"
  url: /
  schedule: every 10 mins
  retry_parameters:
    min_backoff_seconds: 2.5
    max_doublings: 10
我注意到我的cron.yaml可以工作,因为在我的应用程序引擎统计中,每10米有一个活动,但我不知道每10米运行一次代码是否正确

错误



回溯(最近一次呼叫最后一次):
文件“/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py”,第240行,在Handle中
handler=\u config\u handle.add\u wsgi\u中间件(self.\u LoadHandler())
文件“/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py”,第299行,在_LoadHandler中
处理程序,路径,err=LoadObject(self.\u处理程序)
LoadObject中的文件“/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py”,第85行
obj=\uuuuuuuuuuuuuu导入(路径[0])
文件“/base/data/home/apps/s~tribal-bonito-157700/20170302t182530.399552845921654287/scrap.py”,第3行,在
导入请求
ImportError:没有名为请求的模块

您的
cron.yaml
目标是
/
,但是
app.yaml
中没有
/
的处理程序


你说统计数据显示了活动。日志是否显示错误?

是的,未找到显示python等错误的日志。但我注意到应用程序引擎上的图表每天都在上升10m@Boneyflesh您是否在lib文件夹中安装了
请求
库?@AvinashRaj是的,事实上,我使用pip将其安装在
lib
目录中,然后将其添加到我的git存储库中。可能存在重复的
Updating service [default]...failed.                                                                                                                                                                                                          
ERROR: (gcloud.app.deploy) Error Response: [9] 
Application startup error:
/bin/sh: 1: Python: not found
Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/base/data/home/apps/s~tribal-bonito-157700/20170302t182530.399552845921654287/Scrape.py", line 3, in <module>
    import requests
ImportError: No module named requests