Replies: 2 comments 1 reply
-
They seem to have reverted this fix later on in release 0.13.8 (they also mentioned it here). At the same time, they said it should have been fixed with this fix in 0.15.0 |
Beta Was this translation helpful? Give feedback.
-
@alidaw was wondering what if it is not a async memory stream issue, but actual KeyError in starlette-jsonapi ? I was looking at the code where this is happening and it seems there could be a logic problem: if a field is called ‘id’, it might not get this I doubt this is an actual problem, because it would be too obvious and many people would get the same problem here. However, it might explain the error we have, so I will try to look deeper into it |
Beta Was this translation helpful? Give feedback.
-
Fetching the docs of API built with FastAPI framework occasionally fails at the point where schema gets processed and the property called
attributes
as expected by JSON:API is missing.From what the error traceback taken from running container reveals in code snippet shown below is that the root error isn’t caused by mentioned
attributes
KeyError
, but the traceback ends inattributes
KeyError
as kind of “domino effect” caused by a async memory stream issue.The issue seems to be related to an issue promised to have been fixed with starlette release 0.13.7 (Fix high memory usage when using BaseHTTPMiddleware middleware classes and streaming responses), but the issue still seems to be an issue. See also issue raised on GitHub @ Memory usage streaming large responses · Issue #1012 · encode/starlette.
As it is annoying to occasionally face the mentioned issue when simply fetching the API docs it would be great if you could fix it.
Fetching of API docs usually shouldn't be an issue. As it is a server sided issue with HTTP 500 status getting responded it degrades the quality of my API. I didn't faced that issue using other frameworks for building APIs.
Important
Beta Was this translation helpful? Give feedback.
All reactions