小编Teh*_*rez的帖子

使用 Pydantic 和 FastAPI 的 PurePath 的 JSON 模式无法声明错误值

我正在尝试向我的模型添加一个path类型字段PureWindowsPath。按照此处建议实现自定义验证器后https://github.com/samuelcolvin/pydantic/issues/2089#issuecomment-890018075在尝试访问 SwaggerUI 时出现以下错误:

INFO:     127.0.0.1:7696 - "GET /api/openapi.json HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\xxx\.virtualenvs\server-J9mXI7Iu\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 371, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "C:\Users\xxx\.virtualenvs\server-J9mXI7Iu\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 59, in __call__
    return await self.app(scope, receive, send)
  File "C:\Users\xxx\.virtualenvs\server-J9mXI7Iu\lib\site-packages\fastapi\applications.py", line 208, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\xxx\.virtualenvs\server-J9mXI7Iu\lib\site-packages\starlette\applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\xxx\.virtualenvs\server-J9mXI7Iu\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__
    raise exc …
Run Code Online (Sandbox Code Playgroud)

python pydantic fastapi

9
推荐指数
1
解决办法
5476
查看次数

CLion 无法运行程序“make” 系统找不到指定的文件

在 CLion 中打开 makefile 项目时,我收到错误消息:

Cannot run program "make" (in directory "D:\Werkstudent\XWF\XT_Einzelauswertung"): CreateProcess error=2, The system cannot find the file specified: CreateProcess error=2, The system cannot find the file specified
Make execution failed with exit code = 127
Run Code Online (Sandbox Code Playgroud)
  • 我使用的是 mingw64,在 Windows 上与 msys2 一起安装。
  • mingw-w64-x86_64-toolchain已安装。
  • Build, Execution, Deployment -> Toolchains我添加了 MinGW 和 Environment C:\msys64\mingw64。Make、C 编译器和 C++ 编译器都被正确检测到。
  • Build, Execution, Deployment -> Build Tools -> Make我已将可执行文件的路径设置为C:\msys64\mingw64\bin\mingw32-make.exe.

CLion的相关调试日志:

2020-11-23 10:01:57,997 [ 244797]   INFO - …
Run Code Online (Sandbox Code Playgroud)

makefile jetbrains-ide mingw-w64 msys2 clion

6
推荐指数
1
解决办法
8023
查看次数

标签 统计

clion ×1

fastapi ×1

jetbrains-ide ×1

makefile ×1

mingw-w64 ×1

msys2 ×1

pydantic ×1

python ×1