erro: expected value (list, dict, int or string) in bencoded string

General support for problems installing or using Deluge
fmar
Leecher
Leecher
Posts: 74
Joined: Sun Mar 08, 2020 5:34 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by fmar »

Hi @Shadallark,

I mirrored your settings on Debian and got the same error as you.

What I found strange were the dependencies for the development package of libtorrent:

Code: Select all

# apt-cache depends libtorrent-rasterbar10
libtorrent-rasterbar10
  PreDepends: dpkg
    dpkg:i386
  Depends: <libboost-system1.58.0>
  Depends: libc6
  Depends: libgcc1
  Depends: <libssl1.0.0>
  Depends: libstdc++6
  Suggests: libtorrent-rasterbar-dbg
root@deb-vm:/etc/apt# 
It depends on libssl1.0 while the current stable Debian package uses libssl1.1 as dependency:

Code: Select all

# apt-cache depends libtorrent-rasterbar9
libtorrent-rasterbar9
  Depends: libboost-chrono1.67.0
  Depends: libboost-random1.67.0
  Depends: libboost-system1.67.0
  Depends: libc6
  Depends: libgcc1
  Depends: libssl1.1
  Depends: libstdc++6
  Suggests: libtorrent-rasterbar-dbg
I fiddled around with the package sources and used "disco" as distribution. With this the dependencies looked alright:

Code: Select all

# apt-cache depends libtorrent-rasterbar10
libtorrent-rasterbar10
  PreDepends: dpkg
    dpkg:i386
  Depends: libboost-system1.67.0
  Depends: libc6
  Depends: libgcc1
  Depends: libssl1.1
  Depends: libstdc++6
  Suggests: libtorrent-rasterbar-dbg
So, after I changed the distribution in sources.list to "disco" I ran those commands:

Code: Select all

apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get autoremove
And libtorrent 1.2 was installed:

Code: Select all

root@deb-vm:/etc/apt# apt-cache policy libtorrent-rasterbar10
libtorrent-rasterbar10:
  Installed: 1.2.0+daily9855+3ce277b+201902051125~ubuntu19.04.1
  Candidate: 1.2.0+daily9855+3ce277b+201902051125~ubuntu19.04.1
  Version table:
 *** 1.2.0+daily9855+3ce277b+201902051125~ubuntu19.04.1 500
        500 http://ppa.launchpad.net/libtorrent.org/master-daily/ubuntu disco/main amd64 Packages
        100 /var/lib/dpkg/status
Just an FYI: I was not successful in getting Deluge to run with libtorrent1.2.0. Even after completely removing deluge and libtorrent, reinstalling both with "disco" set as distribution. Deluge always gave me an Python error for libtorrent (see below), but maybe that's what daily builds are about.

Code: Select all

# deluge
No protocol specified

(deluge:24777): dbind-WARNING **: 20:40:08.294: Could not open X display
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)

(deluge:24777): libappindicator-WARNING **: 20:40:09.763: Unable to get the session bus: The connection is closed

(deluge:24777): LIBDBUSMENU-GLIB-WARNING **: 20:40:09.763: Unable to get session bus: The connection is closed
20:40:09 [ERROR   ][deluge.ui.gtk3.gtkui              :1418] /usr/lib/python3/dist-packages/libtorrent.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 23, in <module>
    import deluge.libtorrent as lt
ModuleNotFoundError: No module named 'deluge.libtorrent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/gtk3/gtkui.py", line 310, in _on_reactor_start
    client.start_standalone()
  File "/usr/lib/python3/dist-packages/deluge/ui/client.py", line 640, in start_standalone
    self._daemon_proxy = DaemonStandaloneProxy(self.__event_handlers)
  File "/usr/lib/python3/dist-packages/deluge/ui/client.py", line 461, in __init__
    from deluge.core import daemon
  File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 22, in <module>
    from deluge.core.core import Core
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 28, in <module>
    from deluge._libtorrent import LT_VERSION, lt
  File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 25, in <module>
    import libtorrent as lt
ImportError: /usr/lib/python3/dist-packages/libtorrent.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE
Segmentation fault
fmar
Leecher
Leecher
Posts: 74
Joined: Sun Mar 08, 2020 5:34 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by fmar »

PS: The qBittorrent repository has a stable version of libtorrent 1.2.x available, but I wasn't able to get that working too.

If you are interested:

Code: Select all

deb http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu disco main
Shadallark
Member
Member
Posts: 23
Joined: Sat Oct 14, 2017 2:43 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by Shadallark »

Thanks @fmar for the source listing. I created a clean install of Raspian-Buster and used that source to get libtorrent-rasterbar10 installed.

Off to see about installing Deluge 2.x.

Have a great day everyone!

Shadallark
Running Deluged v2.0.x on a Raspberry Pi 3b running Raspian (Debian Buster) with a Mac OSX Thin Client.
Shadallark
Member
Member
Posts: 23
Joined: Sat Oct 14, 2017 2:43 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by Shadallark »

Using this source:

Code: Select all

deb [trusted=yes] http://ppa.launchpad.net/deluge-team/stable/ubuntu xenial main
I installed Deluge:

Code: Select all

sudo apt-get install deluge
During the installation I noticed that it installed libtorrent-rasterbar9 v1.1.11-2 rather than using libtorrent-rasterbar10 v1.2.3+git20191216.68196dceae-1ppa1~19.04 which I had installed using the qBittorrent source provided above. Before checking to see if I still get this error I am going to uninstall Deluge and try installing it using this source:

Code: Select all

deb [trusted=yes] http://ppa.launchpad.net/deluge-team/stable/ubuntu disco main
to see if it will use libtorrent-rasterbar10 rather than libtorrent-rasterbar9.

Shadallark
Running Deluged v2.0.x on a Raspberry Pi 3b running Raspian (Debian Buster) with a Mac OSX Thin Client.
Shadallark
Member
Member
Posts: 23
Joined: Sat Oct 14, 2017 2:43 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by Shadallark »

Nope, it still installed libtorrent-rasterbar9.

Will try it anyways and see if I still get this error.

Shadallark
Running Deluged v2.0.x on a Raspberry Pi 3b running Raspian (Debian Buster) with a Mac OSX Thin Client.
fmar
Leecher
Leecher
Posts: 74
Joined: Sun Mar 08, 2020 5:34 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by fmar »

@Shadallark: I do hope you get it resolved. If you want me to try anything, I'm happy to help. I'm running Debian in a virtual machine, with snapshots it's not an issue to try something out.
Good luck
Shadallark
Member
Member
Posts: 23
Joined: Sat Oct 14, 2017 2:43 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by Shadallark »

Thanks for the offer @fmar.

I am still getting these errors when I add torrents from deluge-console, the Web UI or the Mac OSX user interface, but they are not problematic like they were in the past. Now when I get them they go away when the tracker is updated (either manually or automatically). I wonder if the issues I was having before were caused by bringing over my v1.3.x state information and trying to upgrade it to use with version 2.x so I would not have to force recheck all 1,500 torrents we are seeding (especially where we are the only ones seeding some of them). That is a different issue though that is not related to this thread.

In summary, doing a clean Raspian install followed by installing libtorrent-rasterbar10 (not being used yet) and Deluge v2.x without bringing over the old state information from v1.3.x makes this error a non-issue. The error still shows up when adding torrents (sometimes) and when files are moved after completion but the error goes away when the tracker is updated.

Shadallark
Running Deluged v2.0.x on a Raspberry Pi 3b running Raspian (Debian Buster) with a Mac OSX Thin Client.
fmar
Leecher
Leecher
Posts: 74
Joined: Sun Mar 08, 2020 5:34 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by fmar »

Hey Shadallark

a libtorrent 1.2.5 package was recently added to Debian: https://packages.qa.debian.org/libt/lib ... erbar.html
As soon as it is moved to unstable I could give it a try and see if it works.

I do have a similar issue with some torrents constantly getting errors. If I manually re-check the torrents, pause and start them again the errors are gone. But they keep coming back with errors, and after some time the error resolves itself.
Funny thing is, it doesn't seem to impact the torrents itself. I had active torrents up- or downloading while having an error.

I use 2.0.4-dev23 on Windows, so it might be a general issue.

Cheers
fmar
Leecher
Leecher
Posts: 74
Joined: Sun Mar 08, 2020 5:34 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by fmar »

@Shadallark

libtorrent 1.2.5 was just accepted to unstable!
Hopfeully it is available in a couple of days to try it out :)

Cheers
fmar
Leecher
Leecher
Posts: 74
Joined: Sun Mar 08, 2020 5:34 pm

Re: erro: expected value (list, dict, int or string) in bencoded string

Post by fmar »

@Shadallark

Today I switched my vm to unstable and did a quick test with Deluge 2.0.3 and libtorrent 1.2.5.
Everything was working fine from the looks of it.

Image
Post Reply