rtorrent-cleanup icon indicating copy to clipboard operation
rtorrent-cleanup copied to clipboard

RuntimeError: Maximum recursion depth exceeded

Open bobokun opened this issue 9 years ago • 8 comments

When trying to run this code. I ran into an issue "RuntimeError: Maximum recursion depth exceeded"

return walk(exp, index + endsub) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 58, in walk endsub = walk(exp[index:], 1) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 47, in walk return walk(exp, endchar + 1) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 58, in walk endsub = walk(exp[index:], 1) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 52, in walk strlength = stringlength(exp, index) File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 33, in stringlength n = int(collapse(num)) # Collapse them, and turn them into an int. File "/home/bobokun/install/rtorrent-cleanup/bencode.py", line 20, in collapse return reduce(lambda x, y: x + y, data) RuntimeError: maximum recursion depth exceeded bobokun@raspberrypi ~/install/rtorrent-cleanup $

bobokun avatar May 29 '15 14:05 bobokun

An earlier version works for me, the version I used was the commit "rename main script".

You can use this version by going "git checkout 8bb439fd9d0019ce2393bbf23412ab376a4479d2"

rWolstenholme avatar Feb 09 '16 15:02 rWolstenholme

just tried that version but I'm still getting a similar error return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 59, in walk return walk(exp, index + endsub) File "/home/bobokun/scripts/bencode.py", line 58, in walk endsub = walk(exp[index:], 1) File "/home/bobokun/scripts/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/scripts/bencode.py", line 47, in walk return walk(exp, endchar + 1) File "/home/bobokun/scripts/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/scripts/bencode.py", line 58, in walk endsub = walk(exp[index:], 1) File "/home/bobokun/scripts/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/scripts/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/scripts/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/scripts/bencode.py", line 53, in walk return walk(exp, index + strlength) File "/home/bobokun/scripts/bencode.py", line 52, in walk strlength = stringlength(exp, index) File "/home/bobokun/scripts/bencode.py", line 33, in stringlength n = int(collapse(num)) # Collapse them, and turn them into an int. File "/home/bobokun/scripts/bencode.py", line 20, in collapse return reduce(lambda x, y: x + y, data) RuntimeError: maximum recursion depth exceeded

bobokun avatar Feb 10 '16 04:02 bobokun

Oops I closed the issue by accident.

bobokun avatar Feb 10 '16 04:02 bobokun

I'm having this issue as well. I've also checked out a different branch as per https://github.com/ntv1000/rtorrent-cleanup/issues/1#issuecomment-181917177 with a different issue and no success.

o6uoq avatar Feb 05 '17 12:02 o6uoq

@bobokun did you ever find a solution to cleaning rtorrent + sessions/downloads?

o6uoq avatar Feb 05 '17 12:02 o6uoq

image

o6uoq avatar Feb 05 '17 12:02 o6uoq

This problem comes either from a torrent-file that is somehow corrupted or the bencode module that I copied from someone else. The problem with this is that I would need to have the torrent file that is causing this error. If anyone of you would be willing to provide it I could take a look at it. (keep in mind that I would see what the torrent is for or in case it is from a private tracker I would have your announce key a´nd you would have to take my word for it that I don't use it maliciously)

ntv1000 avatar Feb 05 '17 13:02 ntv1000

You can also try to add

import sys
sys.setrecursionlimit(15000)

at the top of rtorrent_cleanup.py.

Moredread avatar Oct 19 '19 23:10 Moredread