-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orjson TypeError when used with PostgreSQL database #8744
Comments
@aeisenbarth thanks for the report! Do you have any clue what integer we're passing that would be this large? This looks like a wont-fix upstream ijl/orjson#116 |
I couldn't get a debugger stop at
It seems the culprit is in our data. We had some code where a float64 (!) parameter defaults to the maximum value. This seemed to be valid Python code and did not appear as a problem as long as we used the sqlite database. But in combination with PostgreSQL, the float is somehow converted/stored/parsed as an integer, which is obviously bigger than 64-bit. Here is a minimal example flow: import sys
from prefect import flow
@flow
def my_flow(max_limit: float):
return None
my_flow(max_limit=sys.float_info.max) We can find a solution to avoid such large floats in our code. But still there is somewhere an underlying problem. I would at least expect the float to be still a float (possibly the maximum supported by the database, or even overlowed). |
First check
Bug summary
When using Prefect with a PostgreSQL database and loading the UI flow-runs page, I get a TypeError "Integer exceeds 64-bit range" caused by ijl/orjson#301.
I just wanted to mention it so that it is tracked here. The orjson bug report mentions a work-around which would require patching serialization code in Prefect.
My current workaround is not to configure a PostgreSQL database but resort to the default sqlite until the upstream issue is solved.
Reproduction
Error
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: