Psycopg2 SyntaxError: invalid syntax on "INSERT INTO" database

andydtaylor at andydtaylor at
Thu Jan 10 03:20:10 CET 2013

Thanks for your help guys. 

I was actually doing a few things wrong, but I have got this script to work by declaring fields as varchar and all values as strings. But I would like to log journey time values in hours/minutes, so I will have to look into the following:

1. Retrieving this data from postgres as text, converting it and using it. I will need to add/subtract on this time value; or
2. Recognising it as a time class in the first instance by using the string parsing function.



More information about the Python-list mailing list