edina / nbexchange

External exchange for nbgrader
Other
6 stars 2 forks source link

BUG: Timestamp too long for database field (POST /feedback) #13

Closed BertR closed 3 years ago

BertR commented 4 years ago

sqlalchemy.exc.DataError: (psycopg2.errors.StringDataRightTruncation) value too long for type character varying(12)
 [SQL: 'INSERT INTO feedback (notebook_id, instructor_id, student_id, location, checksum, timestamp, created_at) VALUES (%(notebook_id)s, %(instructor_id)s, %(student_id)s, %(location)s, %(checksum)s, %(timestamp)s, %(created_at)s) RETURNING feedback.id'] [parameters: {'notebook_id': 11, 'instructor_id': 3, 'student_id': 3, 'location': '/disk/remote/courses/1/feedback/86fde15399c4156c8d0aee664b625d3de2920784/Assigment_1/1592908687/217c86dc4722f54677a0fffd2f4457c8.html', 'checksum': '217c86dc4722f54677a0fffd2f4457c8', 'timestamp': '2020-06-23 10:21:57.986603', 'created_at': datetime.datetime(2020, 6, 23, 10, 38, 7, 172926)}] (Background on this error at: http://sqlalche.me/e/9h9h)

Either the timestamp is in the wrong format, or we need to increase the field length.