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

来源:7-5 开发 COVID-19 感染数据查询接口

Mecil9

2022-04-16 22:08

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回答

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

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

    shine_... 回复qq_慕圣2...

    u are right!

    2024-08-26 14:46:14

    共 3 条回复 >

高性能 FastAPI 框架入门精讲

FastAPI 框架快速上手开发,结合 API 交互文档逐个讲解核心模块的使用。

12295 学习 · 87 问题

查看课程

相似问题