问答详情
源自:7-5 开发 COVID-19 感染数据查询接口

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

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


提问者:Mecil9 2022-04-16 22:08

个回答

  • 福星高照
    2022-05-12 16:43:02

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