Builtin TypeError

I keep getting the error when I attempt to submit a form with Date Fields in Pyrad.

(builtins.TypeError) SQLite DateTime type only accepts Python datetime and date objects as input. [SQL: INSERT INTO “Project” (project_name, description, start_date, end_date) VALUES (?, ?, ?, ?)] [parameters: [{‘project_name’: ‘Test Project’, ‘end_date’: ‘2024-12-10 06:03:39’, ‘start_date’: ‘2024-12-10 06:03:39’, ‘description’: ‘Test’}]]

What you can do is, go to the models folder and look for the file for the page you are having that issue with and edit the field from DB.Datetime to Db.String. It should fix the issue for you.

Note: that you will have to do this anytime you republish the project.

1 Like

Thanks, this worked perfectly. I hope there is a bug fix in the works for this.

Many Thanks,