尝试向查询添加日期过滤器时出错。不确定是什么导致它。代码在app engine flex环境中运行。
错误
TypeError: 'module' object is not callable
Cron工作
computation_cron= Blueprint('cron.stock_data_transformation', __name__)
@computation_cron.route('/cron/stock_data_transformation')
def cron():
ds = datastore.Client(project="earningspredictor-173913")
query = ds.query(kind='StockPrice')
query.add_filter('date', '>', datetime(2016,01,01))
dataframe_data = []
temp_dict = {}
for q in query.fetch(limit=1000):
temp_dict["stock_code"] = q["stock_code"]