Quantcast
Channel: help - Forum - FlexGet
Viewing all articles
Browse latest Browse all 837

Tmdb Bug after Update to 3.1.1

$
0
0

@Feromon wrote:

Hallo, after Update to 3.1.1 i have this in my log if i try to open movie tmdb site from webui entry list:

2020-01-09 12:19:25 ERROR    flask.app                     Exception on /tmdb/movies [GET]
Traceback (most recent call last):

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
    cursor, statement, parameters, context
    │       │          │           └ <sqlalchemy.dialects.sqlite.base.SQLiteExecutionContext object at 0x673b6e10>
    │       │          └ ('исцеляющая', 499170)
    │       └ 'INSERT INTO tmdb_search_results (search, movie_id) VALUES (?, ?)'
    └ <sqlite3.Cursor object at 0x66f67220>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 581, in do_execute
    cursor.execute(statement, parameters)
    │      │       │          └ ('исцеляющая', 499170)
    │      │       └ 'INSERT INTO tmdb_search_results (search, movie_id) VALUES (?, ?)'
    │      └ <method 'execute' of 'sqlite3.Cursor' objects>
    └ <sqlite3.Cursor object at 0x66f67220>

sqlite3.IntegrityError: UNIQUE constraint failed: tmdb_search_results.search


The above exception was the direct cause of the following exception:


Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x758dbcd8>
    └ <WorkerThread(CP Server Thread-7, started 1807742048)>
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x740fcd20>
    └ <WorkerThread(CP Server Thread-7, started 1807742048)>

  File "/usr/local/lib/python3.6/dist-packages/cheroot/workers/threadpool.py", line 125, in run
    keep_conn_open = conn.communicate()
                     │    └ <function HTTPConnection.communicate at 0x74087bb8>
                     └ <cheroot.server.HTTPConnection object at 0x6c748a90>

  File "/usr/local/lib/python3.6/dist-packages/cheroot/server.py", line 1280, in communicate
    req.respond()
    │   └ <function HTTPRequest.respond at 0x74087a08>
    └ <cherrypy._cpwsgi_server.CPWSGIHTTPRequest object at 0x66f90210>

  File "/usr/local/lib/python3.6/dist-packages/cheroot/server.py", line 1083, in respond
    self.server.gateway(self).respond()
    │    │      │       └ <cherrypy._cpwsgi_server.CPWSGIHTTPRequest object at 0x66f90210>
    │    │      └ <class 'cheroot.wsgi.Gateway_10'>
    │    └ <cherrypy._cpwsgi_server.CPWSGIServer object at 0x702529f0>
    └ <cherrypy._cpwsgi_server.CPWSGIHTTPRequest object at 0x66f90210>

  File "/usr/local/lib/python3.6/dist-packages/cheroot/wsgi.py", line 143, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
               │    │   │      │        │    │    │    └ <function Gateway.start_response at 0x7015cc00>
               │    │   │      │        │    │    └ <cheroot.wsgi.Gateway_10 object at 0x66f90f50>
               │    │   │      │        │    └ {'ACTUAL_SERVER_PROTOCOL': 'HTTP/1.1', 'PATH_INFO': '/flexget/api/tmdb/movies', 'QUERY_STRING': 'title=%D0%98%D1%81%D1%86%D0%...
               │    │   │      │        └ <cheroot.wsgi.Gateway_10 object at 0x66f90f50>
               │    │   │      └ <cherrypy._cptree.Tree object at 0x740b1610>
               │    │   └ <cherrypy._cpwsgi_server.CPWSGIServer object at 0x702529f0>
               │    └ <cherrypy._cpwsgi_server.CPWSGIHTTPRequest object at 0x66f90210>
               └ <cheroot.wsgi.Gateway_10 object at 0x66f90f50>

  File "/usr/local/lib/python3.6/dist-packages/cherrypy/_cptree.py", line 302, in __call__
    return app(environ, start_response)
           │   │        └ <bound method Gateway.start_response of <cheroot.wsgi.Gateway_10 object at 0x66f90f50>>
           │   └ {'ACTUAL_SERVER_PROTOCOL': 'HTTP/1.1', 'PATH_INFO': '/tmdb/movies', 'QUERY_STRING': 'title=%D0%98%D1%81%D1%86%D0%B5%D0%BB%D1%...
           └ <Flask 'flexget.api.app'>

  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
           │    │        │        └ <bound method Gateway.start_response of <cheroot.wsgi.Gateway_10 object at 0x66f90f50>>
           │    │        └ {'ACTUAL_SERVER_PROTOCOL': 'HTTP/1.1', 'PATH_INFO': '/tmdb/movies', 'QUERY_STRING': 'title=%D0%98%D1%81%D1%86%D0%B5%D0%BB%D1%...
           │    └ <function Flask.wsgi_app at 0x73868198>
           └ <Flask 'flexget.api.app'>

  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
               │    └ <function Flask.full_dispatch_request at 0x73865cd8>
               └ <Flask 'flexget.api.app'>

> File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
         │    └ <function Flask.dispatch_request at 0x73865c90>
         └ <Flask 'flexget.api.app'>

  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
           │    │              │    │           │   └ {}
           │    │              │    │           └ <Request 'https://feromon.spdns.de:3539/flexget/api/tmdb/movies?title=Исцеляющая' [GET]>
           │    │              │    └ 'tmdb_tmdb_movies_api'
           │    │              └ <Rule '/tmdb/movies/' (OPTIONS, HEAD, GET) -> tmdb_tmdb_movies_api>
           │    └ {'static': <bound method _PackageBoundObject.send_static_file of <Flask 'flexget.api.app'>>, 'specs': <function View.as_view....
           └ <Flask 'flexget.api.app'>

  File "/usr/local/lib/python3.6/dist-packages/flask_restplus/api.py", line 313, in wrapper
    resp = resource(*args, **kwargs)
           │         │       └ {}
           │         └ ()
           └ <function View.as_view.<locals>.view at 0x706d0300>

  File "/usr/local/lib/python3.6/dist-packages/flask/views.py", line 88, in view
    return self.dispatch_request(*args, **kwargs)
           │    │                 │       └ {}
           │    │                 └ ()
           │    └ <function Resource.dispatch_request at 0x7375d6f0>
           └ <flexget.components.tmdb.api.TMDBMoviesAPI object at 0x66f90050>

  File "/usr/local/lib/python3.6/dist-packages/flask_restplus/resource.py", line 44, in dispatch_request
    resp = meth(*args, **kwargs)
           │     │       └ {}
           │     └ ()
           └ <function with_session.<locals>.decorator.<locals>.wrapper at 0x66f58150>

  File "/usr/local/lib/python3.6/dist-packages/flexget/api/app.py", line 74, in wrapped
    rv = f(*args, **kwargs)
         │  │       └ {}
         │  └ ()
         └ <function with_session.<locals>.decorator.<locals>.wrapper at 0x66f58660>

  File "/usr/local/lib/python3.6/dist-packages/flexget/utils/database.py", line 30, in wrapper
    return func(*args, **kwargs)
           │     │       └ {'session': <sqlalchemy.orm.session.ContextSession object at 0x6c748190>}
           │     └ ()
           └ <bound method TMDBMoviesAPI.get of <flexget.components.tmdb.api.TMDBMoviesAPI object at 0x66f90050>>

  File "/usr/local/lib/python3.6/dist-packages/flexget/api/app.py", line 367, in wrapped
    rv = method(*args, **kwargs)
         │       │       └ {'session': <sqlalchemy.orm.session.ContextSession object at 0x6c748190>}
         │       └ (<flexget.components.tmdb.api.TMDBMoviesAPI object at 0x66f90050>,)
         └ <function TMDBMoviesAPI.get at 0x706d0468>

  File "/usr/local/lib/python3.6/dist-packages/flexget/components/tmdb/api.py", line 136, in get
    movie = lookup(session=session, **args)
            │              │          └ {'title': 'Исцеляющая', 'tmdb_id': None, 'language': None, 'year': None, 'only_cached': None}
            │              └ <sqlalchemy.orm.session.ContextSession object at 0x6c748190>
            └ <function with_session.<locals>.decorator.<locals>.wrapper at 0x7067ee40>

  File "/usr/local/lib/python3.6/dist-packages/flexget/utils/database.py", line 27, in wrapper
    return func(*args, **kwargs)
           │     │       └ {'session': <sqlalchemy.orm.session.ContextSession object at 0x6c748190>, 'title': 'Исцеляющая', 'tmdb_id': None, 'language':...
           │     └ ()
           └ <function ApiTmdb.lookup at 0x7066edf8>

  File "/usr/local/lib/python3.6/dist-packages/flexget/components/tmdb/api_tmdb.py", line 405, in lookup
    movie = session.merge(movie)
            │       │     └ <flexget.components.tmdb.api_tmdb.TMDBMovie object at 0x66f90470>
            │       └ <function Session.merge at 0x74702d20>
            └ <sqlalchemy.orm.session.ContextSession object at 0x6c748190>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2093, in merge
    self._autoflush()
    │    └ <function Session._autoflush at 0x74702780>
    └ <sqlalchemy.orm.session.ContextSession object at 0x6c748190>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1588, in _autoflush
    util.raise_from_cause(e)
    │    └ <function raise_from_cause at 0x74c6d0c0>
    └ <module 'sqlalchemy.util' from '/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/__init__.py'>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
    │            │           │             │             └ None
    │            │           │             └ <traceback object at 0x673b5e90>
    │            │           └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)
    │            └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)
    └ <function reraise at 0x74c4ee88>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 153, in reraise
    raise value
          └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1577, in _autoflush
    self.flush()
    │    └ <function Session.flush at 0x747000c0>
    └ <sqlalchemy.orm.session.ContextSession object at 0x6c748190>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2470, in flush
    self._flush(objects)
    │    │      └ None
    │    └ <function Session._flush at 0x74700198>
    └ <sqlalchemy.orm.session.ContextSession object at 0x6c748190>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2608, in _flush
    transaction.rollback(_capture_exception=True)
    │           └ <function SessionTransaction.rollback at 0x746fef60>
    └ <sqlalchemy.orm.session.SessionTransaction object at 0x6bd83710>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
    │      │       │         │          └ <traceback object at 0x6bdddc88>
    │      │       │         └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)
    │      │       └ <class 'sqlalchemy.exc.IntegrityError'>
    │      └ <function reraise at 0x74c4ee88>
    └ <module 'sqlalchemy.util.compat' from '/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py'>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 153, in reraise
    raise value
          └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 2568, in _flush
    flush_context.execute()
    │             └ <function UOWTransaction.execute at 0x746dd108>
    └ <sqlalchemy.orm.unitofwork.UOWTransaction object at 0x6c748170>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
    rec.execute(self)
    │   │       └ <sqlalchemy.orm.unitofwork.UOWTransaction object at 0x6c748170>
    │   └ <function SaveUpdateAll.execute at 0x746dd540>
    └ SaveUpdateAll(mapped class TMDBSearchResult->tmdb_search_results)

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute
    uow,
    └ <sqlalchemy.orm.unitofwork.UOWTransaction object at 0x6c748170>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
    insert,
    └ <generator object _collect_insert_commands at 0x66f7c210>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/persistence.py", line 1084, in _emit_insert_statements
    c = cached_connections[connection].execute(statement, multiparams)
        │                  │                   │          └ [{'search': 'исцеляющая', 'movie_id': 499170}]
        │                  │                   └ <sqlalchemy.sql.dml.Insert object at 0x7019d4b0>
        │                  └ <sqlalchemy.engine.base.Connection object at 0x673b6430>
        └ {<sqlalchemy.engine.base.Connection object at 0x673b6430>: <sqlalchemy.engine.base.Connection object at 0x6bd830d0>}

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 982, in execute
    return meth(self, multiparams, params)
           │    │     │            └ {}
           │    │     └ ([{'search': 'исцеляющая', 'movie_id': 499170}],)
           │    └ <sqlalchemy.engine.base.Connection object at 0x6bd830d0>
           └ <bound method ClauseElement._execute_on_connection of <sqlalchemy.sql.dml.Insert object at 0x7019d4b0>>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
           │          │                      │     │            └ {}
           │          │                      │     └ ([{'search': 'исцеляющая', 'movie_id': 499170}],)
           │          │                      └ <sqlalchemy.sql.dml.Insert object at 0x7019d4b0>
           │          └ <function Connection._execute_clauseelement at 0x7495b300>
           └ <sqlalchemy.engine.base.Connection object at 0x6bd830d0>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1101, in _execute_clauseelement
    distilled_params,
    └ [{'search': 'исцеляющая', 'movie_id': 499170}]

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1250, in _execute_context
    e, statement, parameters, cursor, context
       │          │           │       └ <sqlalchemy.dialects.sqlite.base.SQLiteExecutionContext object at 0x673b6e10>
       │          │           └ <sqlite3.Cursor object at 0x66f67220>
       │          └ ('исцеляющая', 499170)
       └ 'INSERT INTO tmdb_search_results (search, movie_id) VALUES (?, ?)'

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1476, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
    │    │                │                     └ (<class 'sqlite3.IntegrityError'>, IntegrityError('UNIQUE constraint failed: tmdb_search_results.search',), <traceback object...
    │    │                └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)
    │    └ <function raise_from_cause at 0x74c6d0c0>
    └ <module 'sqlalchemy.util' from '/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/__init__.py'>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
    │            │           │             │             └ IntegrityError('UNIQUE constraint failed: tmdb_search_results.search',)
    │            │           │             └ <traceback object at 0x673b40a8>
    │            │           └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)
    │            └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)
    └ <function reraise at 0x74c4ee88>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 152, in reraise
    raise value.with_traceback(tb)
          │     │              └ <traceback object at 0x673b40a8>
          │     └ <method 'with_traceback' of 'BaseException' objects>
          └ IntegrityError('(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search',)

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
    cursor, statement, parameters, context
    │       │          │           └ <sqlalchemy.dialects.sqlite.base.SQLiteExecutionContext object at 0x673b6e10>
    │       │          └ ('исцеляющая', 499170)
    │       └ 'INSERT INTO tmdb_search_results (search, movie_id) VALUES (?, ?)'
    └ <sqlite3.Cursor object at 0x66f67220>

  File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 581, in do_execute
    cursor.execute(statement, parameters)
    │      │       │          └ ('исцеляющая', 499170)
    │      │       └ 'INSERT INTO tmdb_search_results (search, movie_id) VALUES (?, ?)'
    │      └ <method 'execute' of 'sqlite3.Cursor' objects>
    └ <sqlite3.Cursor object at 0x66f67220>

sqlalchemy.exc.IntegrityError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
(sqlite3.IntegrityError) UNIQUE constraint failed: tmdb_search_results.search
[SQL: INSERT INTO tmdb_search_results (search, movie_id) VALUES (?, ?)]
[parameters: ('исцеляющая', 499170)]
(Background on this error at: http://sqlalche.me/e/gkpj)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 837

Trending Articles