Skip to content

BUG: Unhandled error in plugin discover: 'CFScrapeWrapper' object has no attribute 'RequestException' #2384

@girtsl

Description

@girtsl

Expected behaviour:

Request errors in the torznab plugin are handled gracefully.
A single timeout doesn't kill the whole task? Perhaps a circuit breaker.

Actual behaviour:

On request timeout an error is thrown by urllib3.connectionpool which doesn't seem to be handled correctly by torznab and bubbles up to discover.

Steps to reproduce:

No particular steps, just had flexget running overnight with torznab configured as the search plugin for discover.

Config:

Configure flexget to have torznab as a search plugin for discover.

Log:

BUG: Unhandled error in plugin discover: 'CFScrapeWrapper' object has no attribute 'RequestException' (click to expand)
2019-05-05 05:37 INFO     torznab       download-shows  Fetching URL: http://localhost:9117/api/v2.0/indexers/all/results/torznab/api?q=Game+of+Thrones+%282011%29&apikey=apikey&t=tvsearch&season=8&ep=4&extended=1&cat=5000%2C5010%2C5020%$
2019-05-05 05:37 DEBUG    utils.requests download-shows  GETing URL http://localhost:9117/api/v2.0/indexers/all/results/torznab/api?q=Game+of+Thrones+%282011%29&apikey=apikey&t=tvsearch&season=8&ep=4&extended=1&cat=5000%2C5010%2C5020%2C$
2019-05-05 05:37 WARNING  urllib3.connectionpool                 Retrying (Retry(total=0, connect=None, read=None, redirect=0, status=None)) after connection broken by 'ReadTimeoutError("HTTPConnectionPool(host='localhost', port=9117): Read timed out. (read time$
2019-05-05 05:38 CRITICAL task          download-shows  BUG: Unhandled error in plugin discover: 'CFScrapeWrapper' object has no attribute 'RequestException'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 522, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/input/discover.py", line 293, in on_task_input
    return self.execute_searches(config, entries, task)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/input/discover.py", line 135, in execute_searches
    search_results = search.search(task=task, entry=entry, config=plugin_config)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/input/torznab.py", line 56, in search
    return self.create_entries_from_query(self._build_url(**params), task)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugin.py", line 126, in wrapped_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/input/torznab.py", line 157, in create_entries_from_query
    except task.requests.RequestException as e:
AttributeError: 'CFScrapeWrapper' object has no attribute 'RequestException'

Additional information:

  • FlexGet version: 2.20.25
  • Python version: 2.7.13
  • Installation method: pip
  • Using daemon (yes/no): yes
  • OS and version: OSMC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions