From 8f0feb883d9fcd4266658febef5af284f3d951e9 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Thu, 16 Mar 2023 01:31:58 +0000 Subject: [PATCH] my.twitter.twint: use dict row factory instead of sqlite Row otherwise it's not json serializable --- my/twitter/twint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/my/twitter/twint.py b/my/twitter/twint.py index 54c7f91..ceb5406 100644 --- a/my/twitter/twint.py +++ b/my/twitter/twint.py @@ -109,13 +109,13 @@ ORDER BY T.created_at def tweets() -> Iterator[Res[Tweet]]: - with sqlite_connection(get_db_path(), immutable=True, row_factory='row') as db: + with sqlite_connection(get_db_path(), immutable=True, row_factory='dict') as db: res = db.execute(_QUERY.format(where='F.tweet_id IS NULL')) yield from map(Tweet, res) def likes() -> Iterator[Res[Tweet]]: - with sqlite_connection(get_db_path(), immutable=True, row_factory='row') as db: + with sqlite_connection(get_db_path(), immutable=True, row_factory='dict') as db: res = db.execute(_QUERY.format(where='F.tweet_id IS NOT NULL')) yield from map(Tweet, res)