Skip to content
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

ValueError #54

Open
jhoogeboom opened this issue Apr 9, 2024 · 0 comments
Open

ValueError #54

jhoogeboom opened this issue Apr 9, 2024 · 0 comments

Comments

@jhoogeboom
Copy link

jhoogeboom commented Apr 9, 2024

I'm trying to back up a postgres db to sqlite, but running in to this issue:

ValueError: year 275760 is out of range

This database has a expires_at which is set to 'never', which in this has it just set very far into the future so far that Python cannot deal with it:

COPY omnivore.api_key (id, user_id, name, key, scopes, expires_at, created_at, used_at) FROM stdin;
9702de10-f681-11ee-a194-87a8719f2d3d	deee6128-f25c-11ee-991f-df4a5f9dc67c	Test	82eb3b1c190d7b1c3163aa2387ce67c8310c7e1b554259ac68825a43c00bc1cf	{}	275760-09-13 00:00:00+00	2024-04-09 14:58:13.943123+00	\N

Since I'm selfhosting this software I'm just going to patch the never date with a date like 01-01-9999 that makes sense in python as a workaround. Any idea on how to deal with these kind of errors as a user more generally when using db-to-sqlite? Is there any way to handle errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant