Fatal Python error: Cannot recover from stack overflow.
验证后台最后一组API时,查询已有数据报错。
@application.get('/get_data')
def get_data(city: str = None, skip: int = 0, limit: int = 100, db: Session = Depends(get_db)):
data = crud.get_data(db, city=city, skip=skip, limit=limit)
return data
如果查询已存在数据,终端报错内存溢出.........但之前查询不存在数据或不填入城市名称时并不会报错
FROM data
WHERE EXISTS (SELECT 1
FROM city
WHERE city.id = data.city_id AND city.province = ?) ORDER BY data.date DESC
2021-04-13 22:02:16,059 INFO sqlalchemy.engine.base.Engine ('Shanghai',)
Fatal Python error: Cannot recover from stack overflow.