Re: Problems with time field in mysql

2014-08-19 Thread Andreas Kuhne
I traced the problem down to one row in the mysql-connector-python lib code. When they try to read a time from the database, they do it with the following: """Custom converter for Django""" def _TIME_to_python(self, value, dsc=None): """Return MySQL TIME data type as datetime.time()

Re: Problems with time field in mysql

2014-08-19 Thread Andreas Kuhne
Thanks Sergly, However, the problem is already when I try and get the object from the database. I know that it is the conversion from mysql to python that is the problem. This is the error message I get: Failed converting row to Python types; can't use a string pattern on a bytes-like object (fie

Re: Problems with time field in mysql

2014-08-19 Thread Sergiy Khohlov
which one error ? Look like error is related to __str__ function but I'm not sure (I'm using python 2.7 ) Many thanks, Serge +380 636150445 skype: skhohlov On Tue, Aug 19, 2014 at 6:09 PM, Andreas Kuhne wrote: > Hi all, > > I am having a problem with a time field in my mysql database. I

Problems with time field in mysql

2014-08-19 Thread Andreas Kuhne
Hi all, I am having a problem with a time field in my mysql database. I can add values to the database, but when I try to read the values, I get the following error: Failed converting row to Python types; can't use a string pattern on a bytes-like object (field start_time) The database model look