From 1dbb250413bdf815b3eb12de21d1f60fd29c386c Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 15 Jan 2019 16:09:47 -0500 Subject: [PATCH] fix bytes vs str error in migrate5to6 script --- lbrynet/extras/daemon/migrator/migrate5to6.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lbrynet/extras/daemon/migrator/migrate5to6.py b/lbrynet/extras/daemon/migrator/migrate5to6.py index 69c9389d4..b8cf23cfb 100644 --- a/lbrynet/extras/daemon/migrator/migrate5to6.py +++ b/lbrynet/extras/daemon/migrator/migrate5to6.py @@ -186,10 +186,14 @@ def do_migration(db_dir): (stream_hash, blob_hash, position, iv) ) + download_dir = conf.settings.download_dir + if not isinstance(download_dir, bytes): + download_dir = download_dir.encode() + # insert the file transaction.execute( "insert or ignore into file values (?, ?, ?, ?, ?)", - (stream_hash, stream_name, hexlify(conf.settings.download_dir), + (stream_hash, stream_name, hexlify(download_dir), data_rate, status) )