#3285: UnicodeDecodeError in torrents.state
----------------------------+---------------------
Reporter: raduetsya | Type: bug
Status: new | Priority: minor
Milestone: needs verified | Component: Unknown
Version: 2.0.3 | Keywords:
----------------------------+---------------------
All my torrents have disappeared since the last update.
{{{
$ deluge -L debug
...
12:36:05 [INFO ][deluge.core.torrentmanager :806 ] Loading
torrent state: /home/raduetsya/.config/deluge/state/torrents.state
12:36:05 [ERROR ][deluge.component :132 ] [Failure
instance: Traceback: <class 'UnicodeDecodeError'>: 'ascii' codec can't
decode byte 0xd0 in pos
...
}}}
After the workaround below, all the torrents are back.
{{{
--- torrentmanager.py.bak 2019-07-07 14:40:56.551872384 +0700
+++ torrentmanager.py 2019-07-07 14:26:52.176421350 +0700
@@ -809,7 +809,7 @@
try:
with open(filepath, 'rb') as _file:
- state = pickle.load(_file)
+ state = pickle.load(_file, encoding='latin1')
except (IOError, EOFError, pickle.UnpicklingError) as ex:
message = 'Unable to load {}: {}'.format(filepath, ex)
log.error(message)
}}}
Client: 2.0.3
libtorrent: 1.1.12.0
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3285>
Deluge <https://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/deluge-dev.
To view this discussion on the web visit
https://groups.google.com/d/msgid/deluge-dev/048.53602e7a539f866a95d7a8cedc7aafa9%40deluge-torrent.org.
For more options, visit https://groups.google.com/d/optout.