JohnDoee / autotorrent

Matches torrents with files and gets them seeded
MIT License
269 stars 34 forks source link

Method 'load_start' not defined #21

Closed ordinarygulp closed 5 years ago

ordinarygulp commented 5 years ago

When running autotorrent -a /mnt/user/General/Torrs/*.torrent, after a recent rtorrent Docker update, I am getting the following. What do I need to do?


  File "/usr/bin/autotorrent", line 11, in <module>
    load_entry_point('autotorrent==1.6.3', 'console_scripts', 'autotorrent')()
  File "/usr/lib64/python3.6/site-packages/autotorrent/cmd.py", line 210, in commandline_handler
    result = at.handle_torrentfile(os.path.join(current_path, torrent), dry_run)
  File "/usr/lib64/python3.6/site-packages/autotorrent/at.py", line 465, in handle_torrentfile
    if self.client.add_torrent(torrent, destination_path, files['files'], fast_resume):
  File "/usr/lib64/python3.6/site-packages/autotorrent/clients/rtorrent.py", line 179, in add_torrent
    self.proxy.load_start(*cmd)
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 1112, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 1452, in __request
    verbose=self.__verbose
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 1154, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python3.6/site-packages/autotorrent/scgitransport.py", line 67, in single_request
    return self.parse_response(response_body)
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 1342, in parse_response
    return u.close()
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 656, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -506: "Method 'load_start' not defined">```
JohnDoee commented 5 years ago

Seems like the "old" method is removed completely now. Is it possible for you to install from the git repository and test ?

pip install git+https://github.com/JohnDoee/autotorrent.git#develop --upgrade --force-reinstall
ordinarygulp commented 5 years ago

Just upgraded, and am testing '-a' now. For '-r' I got this, not sure what it means exactly: Rebuilding database ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/Oslo String Quartet/Oslo String Quartet - The Schubert Connection' / '7 Grieg String Quartet in G Minor Op. 27- III. Intermezzo. Allegro molto marcato - Pi\xf9 vivo e scherzando.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - Encore un soir (Deluxe Edition)' / '12 \xc0 la plus haute branche.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - Encore un soir (Deluxe Edition)' / '13 \xc0 vous.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - Encore un soir (Deluxe Edition)' / "2 L'\xe9toile.flac" / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - Encore un soir (Deluxe Edition)' / "7 Si c'\xe9tait \xe0 refaire.flac" / u'hash_store_size' ERROR:autotorrent.db:Failed to insert "/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - Let's Talk About Love" / '6 Tell Him (Duet with Barbra Streisand) (feat. C\xe9line Dion).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - A New Day Has Come' / "13 A\xfan Existe Amor (Spanish version of -L'amour existe encore-).flac" / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - The French Album' / '11 Pri\xe8re Pa\xefenne.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / '1 Je Danse dans ma T\xeate.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / '1 Je ne vous oublie pas (in\xe9dit).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / "10 Mon ami m'a quitt\xe9e.flac" / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / '13 Les derniers seront les premiers (Live \xe0 Paris) (feat. Jean-Jacques Goldman).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / '13 M\xe9lanie.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / '15 Ziggy (Un gar\xe7on pas comme les autres).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / "18 Quand on n'a que l'amour (Live \xe0 l'Olympia).flac" / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / '2 Tous les secrets de ton coeur (in\xe9dit).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / '5 Sous le vent (feat. C\xe9line Dion).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / "9 D'amour ou d'amiti\xe9.flac" / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/C\xe9line Dion/C\xe9line Dion - On ne change pas' / "9 J'irai ou tu iras (Live \xe0 Paris) (feat. Jean-Jacques Goldman).flac" / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/Paul McCartney/Paul McCartney & Wings - At The Speed Of Sound (Deluxe - Remastered)' / '3 She\x92s My Baby (2014 Remaster).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/Paul McCartney/Paul McCartney & Wings - Venus And Mars (Remastered)' / '12 Treat Her Gently \x96 Lonely Old People.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/Paul McCartney/Paul McCartney - Flowers In The Dirt (Special Edition)' / '13 O\xf9 Est Le Soleil- (Remastered 2017).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/Paul McCartney/Paul McCartney - Flowers In The Dirt (Special Edition)' / '15 Tommy\x92s Coming Home (Original Demo).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/Paul McCartney/Paul McCartney - Flowers In The Dirt (Special Edition)' / '20 Don\x92t Be Careless Love (Original Demo).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/Plex Music/FLAC/Peter Frampton/Peter Frampton - Thank You Mr Churchill' / '7 Suite Libert\xe9.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Ne-Yo - GOOD MAN' / '1 -Caterpillars 1st\x94 (INTRO).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Ne-Yo - GOOD MAN' / '16 \x93The Struggle\x85\x94 (Interlude).flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Petrit \xc7eku - Bach- The Cello Suites' / '1 Suite BWV 1007- I. Pr\xe9lude.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Petrit \xc7eku - Bach- The Cello Suites' / '1 Suite BWV 1010- I. Pr\xe9lude.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Petrit \xc7eku - Bach- The Cello Suites' / '13 Suite BWV 1009- I. Pr\xe9lude.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Petrit \xc7eku - Bach- The Cello Suites' / '13 Suite BWV 1012- I. Pr\xe9lude.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Petrit \xc7eku - Bach- The Cello Suites' / '17 Suite BWV 1009- V. Bourr\xe9e I-II.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Petrit \xc7eku - Bach- The Cello Suites' / '5 Suite BWV 1010- V. Bourr\xe9e I-II.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Petrit \xc7eku - Bach- The Cello Suites' / '7 Suite BWV 1008- I. Pr\xe9lude.flac' / u'hash_store_size' ERROR:autotorrent.db:Failed to insert '/mnt/user/Music/ToSort/FLAC/Petrit \xc7eku - Bach- The Cello Suites' / '7 Suite BWV 1011- I. Pr\xe9lude.flac' / u'hash_store_size' Database rebuilt

ordinarygulp commented 5 years ago

After it processed a few torrents, I get this error with '-a':

File "/usr/bin/autotorrent", line 11, in <module> load_entry_point('autotorrent==1.6.3', 'console_scripts', 'autotorrent')() File "/usr/lib64/python2.7/site-packages/autotorrent/cmd.py", line 210, in commandline_handler result = at.handle_torrentfile(os.path.join(current_path, torrent), dry_run) File "/usr/lib64/python2.7/site-packages/autotorrent/at.py", line 465, in handle_torrentfile if self.client.add_torrent(torrent, destination_path, files['files'], fast_resume): File "/usr/lib64/python2.7/site-packages/autotorrent/clients/rtorrent.py", line 186, in add_torrent self.proxy.load.start(*cmd) File "/usr/lib64/python2.7/xmlrpclib.py", line 1243, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.7/xmlrpclib.py", line 1602, in __request verbose=self.__verbose File "/usr/lib64/python2.7/xmlrpclib.py", line 1283, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib64/python2.7/site-packages/autotorrent/scgitransport.py", line 67, in single_request return self.parse_response(response_body) File "/usr/lib64/python2.7/xmlrpclib.py", line 1493, in parse_response return u.close() File "/usr/lib64/python2.7/xmlrpclib.py", line 800, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault -501: 'Could not find info-hash.'>

ordinarygulp commented 5 years ago

And upon another run:


  File "/usr/lib64/python3.6/shelve.py", line 111, in __getitem__
    value = self.cache[key]
KeyError: 's:2420'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/autotorrent", line 11, in <module>
    load_entry_point('autotorrent==1.6.3', 'console_scripts', 'autotorrent')()
  File "/usr/lib64/python3.6/site-packages/autotorrent/cmd.py", line 210, in commandline_handler
    result = at.handle_torrentfile(os.path.join(current_path, torrent), dry_run)
  File "/usr/lib64/python3.6/site-packages/autotorrent/at.py", line 428, in handle_torrentfile
    found_size, missing_size, files = self.parse_torrent(torrent)
  File "/usr/lib64/python3.6/site-packages/autotorrent/at.py", line 319, in parse_torrent
    files = self.index_torrent(torrent)
  File "/usr/lib64/python3.6/site-packages/autotorrent/at.py", line 308, in index_torrent
    modified_result, result = self.find_hash_checks(torrent, result)
  File "/usr/lib64/python3.6/site-packages/autotorrent/at.py", line 118, in find_hash_checks
    files_to_check += self.db.find_hash_size(f['length'])
  File "/usr/lib64/python3.6/site-packages/autotorrent/db.py", line 238, in find_hash_size
    return self.db.get(str('s:%s' % size), [])
  File "/usr/lib64/python3.6/shelve.py", line 106, in get
    return self[key]
  File "/usr/lib64/python3.6/shelve.py", line 114, in __getitem__
    value = Unpickler(f).load()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128)```
drewbitt commented 5 years ago

I too get not finding info-hash

Found # torrent(s)
Traceback (most recent call last):
  File "./autotorrent", line 11, in <module>
    sys.exit(commandline_handler())
  File "/home/dre/Documents/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/cmd.py", line 210, in commandline_handler
    result = at.handle_torrentfile(os.path.join(current_path, torrent), dry_run)
  File "/home/dre/Documents/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/at.py", line 465, in handle_torrentfile
    if self.client.add_torrent(torrent, destination_path, files['files'], fast_resume):
  File "/home/dre/Documents/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/clients/rtorrent.py", line 186, in add_torrent
    self.proxy.load.start(*cmd)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1316, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1493, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 800, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -501: 'Could not find info-hash.'>

Python 2.7.15rc1, rtorrent 0.9.7, I installed the old version first like @d2dyno and then upgraded to github version, however, installing in a new virtualenv and installing the github version (command in README) gave same error.

JohnDoee commented 5 years ago

Thanks for testing, I'll actually read the documentation this time instead of guessing.

@d2dyno Can you tell me which docker image you're using or which one it inherits from ? Something I can find on https://hub.docker.com/ would be great.

I think the encoding problem you're having is the one there's a pull request for right now. I have been unable to both reproduce it and find a solution that works for everyone.

ordinarygulp commented 5 years ago

@JohnDoee I am using this docker: https://hub.docker.com/r/linuxserver/rutorrent/

JohnDoee commented 5 years ago

The original load.start error should be fixed now.

About the encoding problem, @d2dyno can you tell me the filesystem of /mnt/user/Music and if you have any other ideas or data what might be related, I'm very interested. When I copy your filenames and run autotorrent, I get no exceptions.

itzaname commented 5 years ago

d.set_directory_base has also been replaced with d.directory_base.set

22

drewbitt commented 5 years ago

Can confirm, torrents are now added with the fix but do not have their directory set due to Command on torrent creation failed: Command \"d.set_directory_base\" does not exist.

JohnDoee commented 5 years ago

@itzaname I'm sorry, I didn't see you started fixing before I had finished the changes myself.

ordinarygulp commented 5 years ago

Latest commit fixed this issue for me. Haven't seen the unicode error pop up again yet either. I removed my 'music' disc from the config, since Filezilla also reports some kind of special character issue with that folder.

Thanks for the quick updates @JohnDoee ! Also, anywhere I can donate to you? This project has saved me more time than I can even calculate.

JohnDoee commented 5 years ago

@d2dyno I got no such thing, I'm happy for the gesture though.

If you want the encoding bug fixed feel free to open a new ticket.