为了账号安全,请及时绑定邮箱和手机立即绑定

这里输入城市名称,获数据时,抛出一个错误,不输入城市名称是正常的。

stapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 101, in jsonable_encoder

    encoded_value = jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 101, in jsonable_encoder

    encoded_value = jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 101, in jsonable_encoder

    encoded_value = jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 101, in jsonable_encoder

    encoded_value = jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 101, in jsonable_encoder

    encoded_value = jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 101, in jsonable_encoder

    encoded_value = jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 145, in jsonable_encoder

    return jsonable_encoder(

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/site-packages/fastapi/encoders.py", line 52, in jsonable_encoder

    if isinstance(obj, BaseModel):

  File "/Users/mecilmeng/miniforge3/envs/fastapi/lib/python3.10/abc.py", line 119, in __instancecheck__

    return _abc_instancecheck(cls, instance)

RecursionError: maximum recursion depth exceeded in comparison


正在回答

1 回答

我也碰到这个错误了,请问你怎么修复的?谢谢

0 回复 有任何疑惑可以回复我~
#1

福星高照

解决了.
2022-05-14 回复 有任何疑惑可以回复我~
#2

qq_慕圣2233221

# crud.py文件里有个错误 return db.query(models.Data).filter(models.Data.city.has(province=city)) '问题出现在这行代码,缺少了'.all() return db.query(models.Data).filter(models.Data.city.has(province=city)).all()
2022-07-12 回复 有任何疑惑可以回复我~
#3

shine_rainbow 回复 qq_慕圣2233221

u are right!
2024-08-26 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

这里输入城市名称,获数据时,抛出一个错误,不输入城市名称是正常的。

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信