Page 1 of 2

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

Posted: Mon Apr 09, 2018 10:05 am
by Cantalupo
It simply stopped working.

I tested the same "Tracker" in the Deluge client on windows and working normally.

So I believe it is some incompatibility of the torrent client version with the operating system.

My default system is linux.

Version: 1.3.15

Image

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

Posted: Wed Mar 11, 2020 3:26 am
by Shadallark
Good day to all of you;

I realize this thread is from a really long time ago. Up until I upgraded to deluged 2.0.3-2-201906121747-ubuntu16.04.1, and started adding new torrents today I had never seen this error before. As indicated above the error says:

Code: Select all

Error: expected value (list, dict, int or string) in bencoded string
It seems to happen once the torrent has finished loading but before it updates the tracker to indicate it is done. Not all torrents that I obtain from this site cause this to happen, and some of them, when I tell them to update the tracker switch their tracker status to Announce and then to Announce OK.

Has anyone else seen this error or have some ideas on what might be causing it?

Shadallark

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

Posted: Wed Mar 11, 2020 8:38 am
by shamael
Hi,

Have you tried changing the libtorrent version? (a couple of topic on the forum about the lat 1.2.X version). I haven't deal with this error but it would be my first guess

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

Posted: Wed Mar 11, 2020 9:24 am
by Shadallark
Thanks for the advice @shamael.

Can someone point me to a source that I can use to get lib torrent 1.2.x? None of the sources I am currently using provide anything more recent that 1.1.11-2 as shown here:

Code: Select all

sudo apt-cache policy libtorrent*
libtorrent20:
  Installed: (none)
  Candidate: 0.13.7-1
  Version table:
     0.13.7-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
libtorrent-dev:
  Installed: (none)
  Candidate: 0.13.7-1
  Version table:
     0.13.7-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
libtorrent-rasterbar9:
  Installed: 1.1.11-2
  Candidate: 1.1.11-2
  Version table:
 *** 1.1.11-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
        100 /var/lib/dpkg/status
libtorrent-rasterbar-dbg:
  Installed: (none)
  Candidate: 1.1.11-2
  Version table:
     1.1.11-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
libtorrent-rasterbar-dev:
  Installed: (none)
  Candidate: 1.1.11-2
  Version table:
     1.1.11-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
libtorrent-rasterbar-doc:
  Installed: (none)
  Candidate: 1.1.11-2
  Version table:
     1.1.11-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
Edit: Getting new errors when I restarted deluged today. Hopefully upgrading libtorrent will deal with all of these.

Code: Select all

06:43:53 [ERROR   ][deluge.core.torrentmanager    :1492] on_alert_fastresume_rejected: Homeland.S07E12.WEB.H264-DEFLATE fast resume rejected. check resume(): missing or invalid 'file sizes' entry
06:43:53 [ERROR   ][deluge.core.torrentmanager    :1492] on_alert_fastresume_rejected: Homeland.S08E04.WEB.H264-XLF fast resume rejected. check resume(): missing or invalid 'file sizes' entry
end of Edit.

Thanks in advance for any assistance you can provide.

Shadallark

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

Posted: Wed Mar 11, 2020 11:04 am
by mhertz
After quick digging(not much time now to investigate), the last issue is probably an issue shamael fixed and described previously: viewtopic.php?f=7&t=48629

Your first and main issue I'm sorry I don't know, and is usually reported from users using RSS feeds somehow corrupted or wrong othetwise(e.g no links in feed). On qbittorrent it was reported often through time, and they made some improvements but still reported afterwards often. Puzzling though that sometimes you can fix by recheck/announce and at end of download, so couldn't really be corrupted feed, even if was/is using RSS. Sorry cannot help, but only had time though for a quick search.

As shamael correctly stated, there are some issues for some, with libtorrent 1.2.4 and for some also on 1.2.5, but you then afterwards posted commands showing using 1.1.11, but could of course help upgrading regardless, but again sorry I don't know from top of head where/how to get newer libtorrent on ubuntu if wanna try that, sorry, but you can probably Google it, e.g a PPA or otherwise development package as seemingly not in regular repos from your posted commands.

Hopefully others can help you out with this better :) Good luck.

Edit: The official deluge PPA isn't with newer libtorrent, and there's a development deluge PPA that's newer, but still not using newest 1.1.x and 2 months old as newest PPA rebuild, plus shows deluge as having version 2.1.1 for some reason I don't really get, as 2.1 not even released yet and dev-builds use other naming-scheme e.g latest currently is 2.0.4.dev23. If wanting to try upgrade libtorrent and see if helps your issue, then if not finding a PPA, then atleast I saw ubuntu 19.10 has next-newest 1.1.x so 1.1.13, which maybe you can try(don't know how such works on ubuntu though), and I think is this, but maybe you need add it into your sources list for apt or something instead of downloading package and install, though there also could be dependency problems afterwards I dunno.

https://packages.ubuntu.com/eoan/libtorrent-rasterbar9 (python3-libtorrent is included in that package, it states when searching for that instead)

Otherwise there's then:

Lbtorrent ubuntu ppa daily builds of 1.2.x:
https://launchpad.net/~libtorrent.org/+ ... /1.2-daily

And of 1.1.x:
https://launchpad.net/~libtorrent.org/+ ... -1.1-daily

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

Posted: Wed Mar 11, 2020 5:44 pm
by Shadallark
Thank you very much for the information @mhertz; it is greatly appreciated.

I took a look at the daily builds; unfortunately, where I am running on a Raspberry Pi with Raspian installed (basically a modified Debian Buster system) I am not able to use the PPA packages as they are designed for Ubuntu (as far as I can tell anyways). Therefore, I think I am going to try following the instructions on the Libtorrent site to get the source code and build it myself.

Shadallark

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

Posted: Wed Mar 11, 2020 6:48 pm
by mhertz
You're welcome mate, and sorry, I somehow got in my head you where on ubuntu, because of the ubuntu ending in the deluge version you where using, even though both your command-output and signature clearly states otherwise, damn, lol ;) Anyway hope you can get it sorted out regardless with manual building or whatnot, and good luck :)

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

Posted: Thu Mar 12, 2020 2:26 am
by Shadallark
Well, this issue has just become a whole bunch weirder. I have not had the chance to build libtorrent 1.2.x yet. I have done some additional testing and here is what I have find:
  • If I allow the system to download more than two torrents at the same time; they will all error out and need to be removed from the system and re-added;
  • If I set my preferences to only download two torrents at a time I can add three torrents to the system and they will all download correctly (2 downloading and 1 queued initially);
  • If I set my preferences to only download two torrents at a time I cannot add more than three torrents to the system (2 downloading and 1 queued) or they will all error out and need to be removed and re-added;
  • I have not come across any torrents that error out and have to be removed if I have three or fewer torrents on the go at the same time (max 2 downloading and 1 queued);
  • I can user the same .torrent file from the torrent-backups folder to successfully add torrents after I have removed them if they error out;
  • I have found that the error this thread is about is not an issue, if I download no more than three torrents at a time (2 downloading and 1 queued) they will exhibit this error but the next time the tracker is updated (manually or on a timed basis) the error goes away.
I am still going to try to figure out how to upgrade to libtorrent 1.2.x over the next couple of weeks (real life will be in the way this weekend) to see if that alleviates this issue.

Have a great day everyone!

Shadallark

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

Posted: Thu Mar 12, 2020 10:08 am
by shamael
@Shadallark you can use the PPA on Debian distribution, I'm on a customized Debian and RPI too and this is not an issue. I simply adjust the repo with the corresponding Ubuntu Kernel version.

I may have not noticed this error as my setup perfoms at best regarding the RPI resources with a single download at a time. This preference with the queue settings above my total number of torrents (max 1 for D/L, all torrents seeding all the time) gives me the best sharing ration w/o having the RPI almost down. Kodi is on it too and both services work together happily.

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

Posted: Fri Mar 13, 2020 12:49 am
by Shadallark
Thanks for the advice @shamael.

So I figured out I could add the dailies site to my sources.list as follows:

Code: Select all

deb [trusted=yes] http://ppa.launchpad.net/libtorrent.org/1.2-daily/ubuntu xenial main
I went with xenial because I had been referred to the following to get Deluge v2.x.x:

Code: Select all

deb [trusted=yes] http://ppa.launchpad.net/deluge-team/stable/ubuntu xenial main
and since that worked for getting me v2.0.3-2~201906121747~ubuntu16.04.1 running on my Raspberry Pi I figured that xenial was likely my best bet for getting libtorrent v1.2.

Unfortunately when I tried to install libtorrent-rasterbar10 from this source it gives me the following error:

Code: Select all

The following packages have unmet dependencies:
 libtorrent-rasterbar10 : Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
And when I check what is available for libssl I see that I have a newer version installed (libssl1.1.1d and libssl1.0.2):

Code: Select all

sudo apt-cache policy libssl*
libssl-ocaml:
  Installed: (none)
  Candidate: 0.5.5-1
  Version table:
     0.5.5-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
     0.5.5-1 500
        500 http://ftp.ca.debian.org/debian buster/main armhf Packages
libssl1.1-dbgsym:
  Installed: (none)
  Candidate: 1.1.1d-0+deb10u2+rpt1
  Version table:
     1.1.1d-0+deb10u2+rpt1 500
        500 http://archive.raspberrypi.org/debian buster/main armhf Packages
libssl-ocaml-dev:
  Installed: (none)
  Candidate: 0.5.5-1
  Version table:
     0.5.5-1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
     0.5.5-1 500
        500 http://ftp.ca.debian.org/debian buster/main armhf Packages
libssl-ocaml-0j0l3:
  Installed: (none)
  Candidate: (none)
  Version table:
libssl-dev:
  Installed: (none)
  Candidate: 1.1.1d-0+deb10u2+rpt1
  Version table:
     1.1.1d-0+deb10u2+rpt1 500
        500 http://archive.raspberrypi.org/debian buster/main armhf Packages
     1.1.1d-0+deb10u2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
     1.1.1d-0+deb10u2 500
        500 http://ftp.ca.debian.org/debian buster/main armhf Packages
libssl0.9.8-dbg:
  Installed: (none)
  Candidate: (none)
  Version table:
libssl-utils-clojure:
  Installed: (none)
  Candidate: 0.8.3-2
  Version table:
     0.8.3-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
        500 http://ftp.ca.debian.org/debian buster/main armhf Packages
libssl-doc:
  Installed: (none)
  Candidate: 1.1.1d-0+deb10u2+rpt1
  Version table:
     1.1.1d-0+deb10u2+rpt1 500
        500 http://archive.raspberrypi.org/debian buster/main armhf Packages
     1.1.1d-0+deb10u2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
        500 http://ftp.ca.debian.org/debian buster/main armhf Packages
libssl0.9.8:
  Installed: (none)
  Candidate: (none)
  Version table:
libssl-ocaml-dev-0j0l3:
  Installed: (none)
  Candidate: (none)
  Version table:
libssl1.0-dev:
  Installed: (none)
  Candidate: 1.0.2q-2
  Version table:
     1.0.2q-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
libssl1.1:
  Installed: 1.1.1d-0+deb10u2+rpt1
  Candidate: 1.1.1d-0+deb10u2+rpt1
  Version table:
 *** 1.1.1d-0+deb10u2+rpt1 500
        500 http://archive.raspberrypi.org/debian buster/main armhf Packages
        100 /var/lib/dpkg/status
     1.1.1d-0+deb10u2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
     1.1.1d-0+deb10u2 500
        500 http://ftp.ca.debian.org/debian buster/main armhf Packages
libssl1.0.0:
  Installed: (none)
  Candidate: (none)
  Version table:
libssl1.0.2:
  Installed: 1.0.2q-2
  Candidate: 1.0.2q-2
  Version table:
 *** 1.0.2q-2 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
        100 /var/lib/dpkg/status
So I am not sure why it will not install libtorrent-rasterbar10; must require the actual libssl1.0.0.

Ah well. Will keep picking away at it.

Shadallark