原因:无法连接外部dns解决方法:在主入口引入fastapi_offline并用FastAPIOfflinefrom fastapi_offline import FastAPIOffline app = FastAPIOffline()