An error of the form psycopg2.errors.NumericValueOutOfRange: integer out of range.
The error means that in the table the column in which the data was tried to be saved is out of the acceptable range of the number. You need to change this column with INT on the Bigint.
Hello! You are on my site. I am a developer. Here I share my best practices and knowledge. Ask in the comments if you don’t understand something or write if you have something to add.