Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: list_match crashes when an RSS entry contains two years #2249

Closed
RicardoVelaC opened this issue Nov 10, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@RicardoVelaC
Copy link

commented Nov 10, 2018

Expected behaviour:

When in a RSS task parse an entry of a movie uses imdb_lookup if found an coincidence from
list_match add task to transmissionrcp
It's work with different RSS providers with same config.

Actual behaviour:

  • When one entry of RSS contains two year list_match and imdb_lookup plugins make flexget crashes.

  • RSS have a format like this:
    [MicroHD] Some title (estreno 2018)(2016/MHD/1080P/AC3 5.1/DUAL/SUB) [SEEDERS (29)/LEECHERS (2)]

  • It's fail with internal and guessit parser. If title only contain one year it's work ok with guessit parser. If contains two years fail.

Steps to reproduce:

  • Step 1: Create task including an RSS source with two years in the title

Config:

web_server:
  run_v2: true

templates:
  global:
    torrent_alive: no #number of seeders needed to accept

  transmit-movies:
    transmission:
      host: 192.X.X.X
      port: 9091
      username: admin
      password: password
      path: /var/lib/transmission-daemon/downloads/movies
    metainfo_movie: yes
    set:
      rename_like_files: yes
      content_filename: "{{ movie_name }} ({{ movie_year }})"

schedules:
  - tasks: '*'
    interval:
      minutes: 10

  mov_xbytes task:
    priority: 3
    rss: http://domain.com/advanced_rss.php?cats=16&tpc=5&auth=AUTH-PERSONAL-CODE
    parsing:
      movie: guessit
    imdb_lookup: yes
    list_match:
      from:
        - movie_list: movies
      action: accept
    template: transmit-movies

Log:

(click to expand)
2018-11-10 13:01 DEBUG    manager                       Config file /config/config.yml selected
2018-11-10 13:02 INFO     scheduler                     Starting scheduler
2018-11-10 13:02 INFO     web_server_daemon                 Running web server at IP 0.0.0.0:5050
2018-11-10 13:02 INFO     web_server_daemon                 Initiating API
2018-11-10 13:02 INFO     web_server_daemon                 Registering WebUI v2
2018-11-10 13:02 INFO     web_server_daemon                 Registering WebUI v1
2018-11-10 13:02 INFO     web_server                    Web interface available at http://172.17.0.4:5050
2018-11-10 13:03 WARNING  imdb_lookup   mov_xbytes task IMDB lookup failed for [MicroHD] Persecucion al limite (estreno 2018)(2016/MHD/1080P/AC3 5.1/DUAL/SUB) [SEEDERS (29)/LEECHERS (2)]
2018-11-10 13:03 INFO     imdb_lookup   mov_xbytes task Title `[microhd] persecucion al limite (estreno 2018)(2016/mhd/1080p/ac3 5.1/dual/sub) [seeders (29)/leechers (2)]` lookup failed
2018-11-10 13:03 CRITICAL task          mov_xbytes task BUG: Unhandled error in plugin list_match: (sqlite3.InterfaceError) Error binding parameter 2 - probably unsupported type. [SQL: u'SELECT movie_list_movies.id AS movie_list_movies_id, movie_list_movies.added AS movie_list_movies_added, movie_list_movies.title AS movie_list_movies_title, movie_list_movies.year AS movie_list_movies_year, movie_list_movies.list_id AS movie_list_movies_list_id \nFROM movie_list_movies \nWHERE ? = movie_list_movies.list_id AND lower(movie_list_movies.title) = ? AND movie_list_movies.year = ?\n LIMIT ? OFFSET ?'] [parameters: (3, u'persecucion al limite', [2018, 2016], 1, 0)] (Background on this error at: http://sqlalche.me/e/rvf5)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/flexget/task.py", line 486, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/flexget/plugins/filter/list_match.py", line 41, in on_task_filter
    result = thelist.get(entry)
  File "/usr/lib/python2.7/site-packages/flexget/utils/database.py", line 34, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/flexget/plugins/list/movie_list.py", line 228, in get
    match = self._find_entry(entry=entry, session=session)
  File "/usr/lib/python2.7/site-packages/flexget/utils/database.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/flexget/plugins/list/movie_list.py", line 202, in _find_entry
    .filter(MovieListMovie.year == year).first())
  File "/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2789, in first
    ret = list(self[0:1])
  File "/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2581, in __getitem__
    return list(res)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2889, in __iter__
    return self._execute_and_instances(context)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2912, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/usr/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
InterfaceError: (sqlite3.InterfaceError) Error binding parameter 2 - probably unsupported type. [SQL: u'SELECT movie_list_movies.id AS movie_list_movies_id, movie_list_movies.added AS movie_list_movies_added, movie_list_movies.title AS movie_list_movies_title, movie_list_movies.year AS movie_list_movies_year, movie_list_movies.list_id AS movie_list_movies_list_id \nFROM movie_list_movies \nWHERE ? = movie_list_movies.list_id AND lower(movie_list_movies.title) = ? AND movie_list_movies.year = ?\n LIMIT ? OFFSET ?'] [parameters: (3, u'persecucion al limite', [2018, 2016], 1, 0)] (Background on this error at: http://sqlalche.me/e/rvf5)

Additional information:

  • FlexGet version: 2.17.9
  • Python version: 2.7
  • Installation method: pip
  • Using daemon (yes/no): yes
  • OS and version: Linux Alpine 3.8
  • Link to crash log:
@cvium

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

This smells more like a Guessit parser problem. The parser spits out two years in a list and no plugin expects that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.