Opened 5 years ago
Last modified 5 years ago
#3285 new bug
UnicodeDecodeError in torrents.state
Reported by: | raduetsya | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | needs verified |
Component: | Unknown | Version: | 2.0.3 |
Keywords: | Cc: | ian@iangreenleaf.com |
Description
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
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Cc: | added |
---|
comment:4 by , 5 years ago
I can confirm the patch by @Olivier. Arch Linux, python 3.7.3, deluge 2.0.3-1.
comment:5 by , 5 years ago
I also confirm the patch by @Olivier, preferring the 'utf-8' encoding. Upgrading from Fedora 30 deluge-1.3.15-12 to Fedora 31 deluge-2.0.3-5.
Note:
See TracTickets
for help on using tickets.
I had the same issue as the OP. Same client versions, Arch Linux, Python 3.7.3. Can confirm that the included patch resolves the issue.