Sickchill: Impossible to download a torrent

Created on 12 Apr 2019  路  29Comments  路  Source: SickChill/SickChill

SickChill Info:
Branch: master
Commit: b3da866cadff70973fabdbb3ffbe8ad0dd208c49
Version: v2019.04.07-1
Database Version: 44.0
Python Version: 2.7.14 (default, May 28 2018, 15:05:16) [GCC 4.6.4]
SSL Version: OpenSSL 1.0.2n 7 Dec 2017
OS: Linux-3.2.40-armv7l-with-glibc2.4

What you did: I tried to download a torrent
What happened: nothing
What you expected: a torrent downloaded
Logs:

AA TypeError: tuple indices must be integers, not str
AA return (logger.ERROR, logger.WARNING)[exception.message and 's,t,o,p,b,r,e,a,k,i,n,g,f' in exception.message]
AA File "/volume1/@appstore/*********-custom/var/SickBeard/*********/helpers.py", line 1522, in get_level
AA logger.log(default.format(error, type(error.__class__.__name__)), get_level(error))
AA File "/volume1/@appstore/*********-custom/var/SickBeard/*********/helpers.py", line 1578, in handle_requests_exception
AA handle_requests_exception(error)
AA File "/volume1/@appstore/*********-custom/var/SickBeard/*********/helpers.py", line 1514, in download_file
AA hooks={'response': self.get_url_hook}, return_filename=True)
AA File "/volume1/@appstore/*********-custom/var/SickBeard/sickchill/providers/GenericProvider.py", line 119, in download_result
AA newResult = resProvider.download_result(result)
AA File "/volume1/@appstore/*********-custom/var/SickBeard/*********/search.py", line 52, in _downloadResult
AA dlResult = _downloadResult(result)
AA File "/volume1/@appstore/*********-custom/var/SickBeard/*********/search.py", line 123, in snatchEpisode
AA self.success = search.snatchEpisode(searchResult[0])
AA File "/volume1/@appstore/*********-custom/var/SickBeard/*********/search_queue.py", line 182, in run
Bug / Issue Confirmed Upstream

All 29 comments

What torrent site and what download client are you using?

It's a torrent from http://itorrents.org
The client is SickChill because the error is in the download_file function

Looks like that the error is when the function session.get is called

I can modify the file to add trace if you want.

i tried to start sickchill with command to see the error:

/usr/bin/env python2 /volume1/@appstore/sickbeard-custom/var/SickBeard/SickBeard.py --daemon --pidfile /volume1/@appstore/sickbeard-custom/var/sickbeard-custom.pid --config /volume1/@appstore/sickbeard-custom/var/config.ini --datadir /volume1/@appstore/sickbeard-custom/var/ --nolaunch

10:50:01 INFO::SEARCHQUEUE-MANUAL-73762 :: Downloading a result from ThePirateBay at http://itorrents.org/torrent/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.torrent
evalmachine.<anonymous>:1
var s,t,o,p,b,r,e,a,k,i,n,g,f, BRRusvQ={"F":+((!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[])+(!+[]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![])+(+!![])+(!+[]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]))/+((!+[]+!![]+!![]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]))};          s += "==".slice(2 - (s.length & 3));          var bm, r = "", r1, r2, i = 0;          for (; i < s.length;) {              bm = o.indexOf(s.charAt(i++)) << 18 | o.indexOf(s.charAt(i++)) << 12                      | (r1 = o.indexOf(s.charAt(i++))) << 6 | (r2 = o.indexOf(s.charAt(i++)));              r += r1 === 64 ? g(bm >> 16 & 255)                      : r2 === 64 ? g(bm >> 16 & 255, bm >> 8 & 255)

SyntaxError: Illegal return statement
    at createScript (vm.js:80:10)
    at Object.runInNewContext (vm.js:135:10)
    at [eval]:1:27
    at ContextifyScript.Script.runInThisContext (vm.js:50:33)
    at Object.runInThisContext (vm.js:139:38)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:643:30)
    at evalScript (bootstrap_node.js:462:27)
    at startup (bootstrap_node.js:163:9)
    at bootstrap_node.js:608:3
10:50:06 DEBUG::SEARCHQUEUE-MANUAL-73762 :: Traceback (most recent call last):
  File "/volume1/@appstore/*********-custom/var/SickBeard/*********/search_queue.py", line 182, in run
    self.success = search.snatchEpisode(searchResult[0])
  File "/volume1/@appstore/*********-custom/var/SickBeard/*********/search.py", line 123, in snatchEpisode
    dlResult = _downloadResult(result)
  File "/volume1/@appstore/*********-custom/var/SickBeard/*********/search.py", line 52, in _downloadResult
    newResult = resProvider.download_result(result)
  File "/volume1/@appstore/*********-custom/var/SickBeard/sickchill/providers/GenericProvider.py", line 119, in download_result
    hooks={'response': self.get_url_hook}, return_filename=True)
  File "/volume1/@appstore/*********-custom/var/SickBeard/*********/helpers.py", line 1514, in download_file
    handle_requests_exception(error)
  File "/volume1/@appstore/*********-custom/var/SickBeard/*********/helpers.py", line 1578, in handle_requests_exception
    logger.log(default.format(error, type(error.__class__.__name__)), get_level(error))
  File "/volume1/@appstore/*********-custom/var/SickBeard/*********/helpers.py", line 1522, in get_level
    return (logger.ERROR, logger.WARNING)[exception.message and 's,t,o,p,b,r,e,a,k,i,n,g,f' in exception.message]
TypeError: tuple indices must be integers, not str

Yup, same issue, let's see if cfscrape can solve this issue.

@WebSpider , looks like there is a fix :)

Anorov/cloudflare-scrape#220

how do you update cfscrape ?

no, finally, they didn't commit all the modification :'(

I also have the same issue

Please see my comment in #5423 - There is a temporary solution.

@CodyWoolaver works fine! Thanks!

I was able to get mine working again by replacing my __init__.py witht he following and restart docker container
https://raw.githubusercontent.com/lukele/cloudflare-scrape/update-challenge-solver/cfscrape/__init__.py

The one @frank3427 linked will work, so long as you are not using deluge to handle your torrents.

Mine seem to be down loading with deluge, I will confirm in the morning. The downloads are put in a watch folder for deluge to pickup

Sorry, I should have clarified. It has issues with the deluge web ui.
Image

Two quick comments:

1

if someone else with a docker container wants to apply this fix, I got it working by:

  • Downloading the __init__.py file
  • Adding a dock-compose volumes entry as follows:
    volumes:
      - ./sickchill/__init__.py:/app/sickchill/lib/cfscrape/__init__.py
  • docker-compose restart
    Plan being to remove this once the permanent fix is rolled out

2

This updated file is searching with apostrophes, which is should not be.
Example: It searches Bob's Burgers when matches are under Bobs Burgers

Anyone knows how to apply this fix on a synology (linux) ? Ps: My sickchill runs as a sickbeared-custom package

The fix should still be the same, just replacing the contents of that file and restarting the process.

Ok茅 thanks. Ill try to figure out how to replace init.py file with SSH because those files are not accesible through the synology gui

Yup - that would be the path. edit them using nano or vim... easy solution would be:

___deleted___

Thank for the info. These are the step i needed to do for synology:

tip: for me the location of lib/cfscrape was : /volume1/@appstore/sickbeard-custom/var/SickBeard/lib/cfscrape

  • download the modified __init__.py mentioned by Joshfindit above and save it to your c:temp folder on your windows machine.
  • on you synology cd to /volume1/@appstore/sickbeard-custom/var/SickBeard/lib/cfscrape (i used putty)
  • remove original __init__.py file on your synology with this : rm __init__.py
  • copy __init__.py from your windows c:temp folder to your synology. My command was: pscp -P 4022 -scp c:Putty__init__.py [email protected]:/volume1/@appstore/sickbeard-custom/var/SickBeard/lib/cfscrape/
    When you download putty be sure you also download PSCP.EXE
    -P was because i use a custom port.
  • restart package

edit: hope this was clear, otherwise ask !

Please update and see if the issue goes away

Dont manually edit files unless you know how to use git. It will break the updater.

updating breaks all for me. So i had to undo my __init__.py changes (and update to latest version ofcourse) en then all is fixed again.

There was a problem with the changes, which have been fixed a few hours ago. Please update again.

Idd updating fixed errors. All good now 馃憤馃徎

I guess i was wrong. Gives now this error : 2019-05-27 19:58:44 SEARCHQUEUE-DAILY-SEARCH :: [IPTorrents] :: [86207e9] Request failed: Cloudflare IUAM challenge returned unexpected answer. Cloudflare may have changed their technique, or there may be a bug in the script. Please read https://github.com/Anorov/cloudflare-scrape#updates, then file a bug report at https://github.com/Anorov/cloudflare-scrape/issues." ()

Yeah, it's a cat and mouse thing with SC and cloudflare, I hope there will be an update soon :)

Was this page helpful?
0 / 5 - 0 ratings