Skip to content

Upgrading to SQLAlchemy-1.1.1 breaks flexget #1439

@antivirtel

Description

@antivirtel

After upgrading to Flexget 2.3.42, it will upgrade also SQLAlchemy to 1.1.1, which is not the same, so it won't work at all. After downgrading to SQLAlchemy 1.0.15 it is working fine.

Log:

2016-10-10 13:12 CRITICAL task_queue                    BUG: Unhandled exception during task queue run loop.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task_queue.py", line 48, in run
    self.current_task.execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 71, in wrapper
    return func(self, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 640, in execute
    self._execute()
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 588, in _execute
    session.add(TaskConfigHash(task=self.name, hash=config_hash))
  File "/usr/local/lib/python2.7/dist-packages/flexget/utils/sqlalchemy_utils.py", line 142, in __exit__
    self.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 874, in commit
    self.transaction.commit()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 461, in commit
    self._prepare_impl()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 441, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2136, in flush
    self._flush(objects)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2254, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2222, in _flush
    self.dispatch.after_flush(self, flush_context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/event/attr.py", line 218, in __call__
    fn(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/operate/debug_db_sessions.py", line 54, in after_flush
    tid = next(id(t) for t in session.transaction._iterate_parents() if t in open_transactions)
AttributeError: 'SessionTransaction' object has no attribute '_iterate_parents'

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