1. Michael Bayer
  2. sqlalchemy
  3. Issues


Issue #11 resolved

sqlite.SLDateTime.convert_result_value falls over if value is None

Anonymous created an issue

engine.ResultProxy._get_col calls convert_result_value on the column's value. If the column is a TimeStamp in sqlite, this equates to calling sqlite.SLDateTime.convert_result_value, which then tries to split the value on a dot. If the value was NULL and therefore None, this split fails: (warning line numbers will be wrong in sqlite.py; I have patched this file slightly for new data types)

Traceback (most recent call last): File "<stdin>", line 1, in ? File "c:\work_in_progress\sqlalchemy\lib\sqlalchemy\engine.py", line 390, in repr return repr(tuple(key) for key in range(0, len(self.row))) File "c:\work_in_progress\sqlalchemy\lib\sqlalchemy\engine.py", line 360, in _get_col return rec0.convert_result_value(row[rec1]) File "c:\work_in_progress\sqlalchemy\lib\sqlalchemy\databases\sqlite.py", line 41, in convert_result_value (value, microsecond) = value.split('.') AttributeError: 'NoneType' object has no attribute 'split'

Comments (1)

  1. Log in to comment