You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, it seems partial_init being interrupted by an exception is not the only codepath in SQLModel that can lead to corrupted models.
Operating System
Linux
Operating System Details
Reproduced in many environments (GKE cluster, local NixOS machine, macOS laptop, etc.), with different Python versions, on different SQLModel versions.
SQLModel Version
0.0.38
Python Version
3.13
Additional Context
Trace of a local execution of the reproducer:
Reference Hero JSON: `Hero(name='foobar')` -> {"name":"foobar","id":null}
Run in another terminal 'kill -SIGUSR1 27330' to corrupt SQLModel
Received SIGUSR1, interrupted. Hero is now corrupted.
Corrupted Hero JSON: `Hero(name='foobar')` -> {}
Corrupted Hero JSON: `Hero(name='foobar')` -> {}
Corrupted Hero JSON: `Hero(name='foobar')` -> {}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Bug detection
This section is only for SEO, ie. help people in the same situation find this issue
We detected this issue in our codebase as we were starting to see that kind of PostgreSQL errors:
Explanation
Workaround
Note that one way to fix this error is to monkey patch
partial_init:However, it seems
partial_initbeing interrupted by an exception is not the only codepath in SQLModel that can lead to corrupted models.Operating System
Linux
Operating System Details
Reproduced in many environments (GKE cluster, local NixOS machine, macOS laptop, etc.), with different Python versions, on different SQLModel versions.
SQLModel Version
0.0.38
Python Version
3.13
Additional Context
Trace of a local execution of the reproducer:
Beta Was this translation helpful? Give feedback.
All reactions