Message167297
I use Python 3.2.3 on GNU/Linux 64bits (openSUSE 12.2).
I have created an in-memory connection with the following code:
conn = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_DECLTYPES, check_same_thread=False)
conn.row_factory = sqlite3.Row
Then I have filled the database, but when it comes to copy it via conn.iterdump(), it crashed with the following message:
File "/usr/lib64/python3.2/sqlite3/dump.py", line 30, in _iterdump
for table_name, type, sql in sorted(schema_res.fetchall()):
TypeError: unorderable types: sqlite3.Row() < sqlite3.Row()
It seems that the error appears because of the use of "sorted()". In fact, if I don't change conn.row_factory or if I use a custom class _Row implementing __lt__ method (see below) this error does not appear.
class _Row(sqlite3.Row):
def __lt__(self, x):
return False |
|
Date |
User |
Action |
Args |
2012-08-03 08:27:02 | plemarre | set | recipients:
+ plemarre, loewis |
2012-08-03 08:27:02 | plemarre | set | messageid: <1343982422.69.0.920992443085.issue15545@psf.upfronthosting.co.za> |
2012-08-03 08:27:02 | plemarre | link | issue15545 messages |
2012-08-03 08:27:01 | plemarre | create | |
|