[Deluge] #3285: UnicodeDecodeError in torrents.state

11 views
Skip to first unread message

Deluge

unread,
Jul 7, 2019, 3:44:08 AM7/7/19
to delug...@googlegroups.com
#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

Deluge

unread,
Jul 12, 2019, 3:08:34 PM7/12/19
to delug...@googlegroups.com
#3285: UnicodeDecodeError in torrents.state
------------------------+----------------------------
Reporter: raduetsya | Owner:

Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: Unknown | Version: 2.0.3
Resolution: | Keywords:
------------------------+----------------------------

Comment (by youngian):

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.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3285#comment:1>

Deluge

unread,
Jul 12, 2019, 3:09:27 PM7/12/19
to delug...@googlegroups.com
#3285: UnicodeDecodeError in torrents.state
------------------------+----------------------------
Reporter: raduetsya | Owner:
Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: Unknown | Version: 2.0.3
Resolution: | Keywords:
------------------------+----------------------------
Changes (by youngian):

* cc: ian@… (added)


--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3285#comment:2>

Deluge

unread,
Aug 17, 2019, 6:34:38 PM8/17/19
to delug...@googlegroups.com
#3285: UnicodeDecodeError in torrents.state
------------------------+----------------------------
Reporter: raduetsya | Owner:
Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: Unknown | Version: 2.0.3
Resolution: | Keywords:
------------------------+----------------------------

Comment (by Olivier):

In my case, it needed to be
{{{
state = pickle.load(_file, encoding='utf-8')
}}}

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3285#comment:3>

Deluge

unread,
Aug 20, 2019, 10:53:58 PM8/20/19
to delug...@googlegroups.com
#3285: UnicodeDecodeError in torrents.state
------------------------+----------------------------
Reporter: raduetsya | Owner:
Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: Unknown | Version: 2.0.3
Resolution: | Keywords:
------------------------+----------------------------

Comment (by yangsheng6810):

I can confirm the patch by @Olivier. Arch Linux, python 3.7.3, deluge
2.0.3-1.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3285#comment:4>

Deluge

unread,
Feb 28, 2020, 4:02:55 AM2/28/20
to delug...@googlegroups.com
#3285: UnicodeDecodeError in torrents.state
------------------------+----------------------------
Reporter: raduetsya | Owner:
Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: Unknown | Version: 2.0.3
Resolution: | Keywords:
------------------------+----------------------------

Comment (by Phidica):

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.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3285#comment:5>

Deluge

unread,
Feb 28, 2020, 4:08:12 AM2/28/20
to delug...@googlegroups.com
#3285: UnicodeDecodeError in torrents.state
------------------------+----------------------------
Reporter: raduetsya | Owner:
Type: bug | Status: new
Priority: minor | Milestone: needs verified
Component: Unknown | Version: 2.0.3
Resolution: | Keywords:
------------------------+----------------------------

Comment (by jools772):

Why is python 3.7 using ascii encoding?

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3285#comment:6>

Reply all
Reply to author
Forward
0 new messages