Skip to content

Instantly share code, notes, and snippets.

Exception sqlalchemy.exc.InvalidRequestError: InvalidRequestError("This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occuring prematurely) No column item.collection_path is configured on mapper Mapper|DBLine|line... (original cause: UnmappedColumnError: No column item.collection_path is configured on mapper Mapper|DBLine|line...) u'SELECT item.name AS item_name, item.tag AS item_tag, item.collection_path AS item_collection_path \\nFROM item, line \\nWHERE ? = line.item_name AND ? = line.item_collection_path ORDER BY line.timestamp' [immutabledict({})]",) in <bound method Collection.__del__ of <radicale.storage.database.Collection object at 0x7f24cdaf4690>> ignored
# $Id$
# Maintainer: Angel Velasquez <[email protected]>
# Maintainer: Felix Yan <[email protected]>
# Contributor: Stéphane Gaudreault <[email protected]>
# Contributor: Allan McRae <[email protected]>
# Contributor: Jason Chu <[email protected]>
pkgname=python
pkgver=3.6.4
pkgrel=2
@untitaker
untitaker / pytest_marker_multiple_inheritance.py
Last active September 24, 2020 21:04
Workaround for applying pytest markers in baseclasses used with multiple inheritance
import itertools
import pytest
class BaseMeta(type):
@property
def pytestmark(self):
return (
getattr(self, "_pytestmark", []) +
list(itertools.chain.from_iterable(getattr(x, "_pytestmark", []) for x in self.__mro__))
)