Traceback (most recent call last):
File "D:\项目\fastAPI-comment\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 384, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\fastapi\applications.py", line 165, in __call__
await super().__call__(scope, receive, send)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\applications.py", line 102, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__
raise exc from None
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\middleware\errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\exceptions.py", line 82, in __call__
raise exc from None
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\routing.py", line 550, in __call__
await route.handle(scope, receive, send)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\routing.py", line 227, in handle
await self.app(scope, receive, send)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\routing.py", line 41, in app
response = await func(request)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\fastapi\routing.py", line 196, in app
raw_response = await run_endpoint_function(
File "D:\项目\fastAPI-comment\venv\lib\site-packages\fastapi\routing.py", line 150, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "D:\项目\fastAPI-comment\venv\lib\site-packages\starlette\concurrency.py", line 34, in run_in_threadpool
return await loop.run_in_executor(None, func, *args)
File "c:\program files\python38\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "d:\项目\fastAPI-comment\api\comment.py", line 11, in get_AllComment
allCommentJson = json.loads(dbSchemes.inquire_AllComment())
File "<string>", line 2, in inquire_AllComment
File "D:\项目\fastAPI-comment\venv\lib\site-packages\pony\orm\core.py", line 528, in new_func
result = func(*args, **kwargs)
File "d:\项目\fastAPI-comment\database\schemes.py", line 6, in inquire_AllComment
commentList = Comment.select(lambda c: c.article != None)[:]
AttributeError: 'function' object has no attribute 'select'
Error
Code
Model