diff --git a/anki/db.py b/anki/db.py index e65336da2..6fe6665b8 100644 --- a/anki/db.py +++ b/anki/db.py @@ -39,6 +39,17 @@ except ImportError: from sqlalchemy import Unicode UnicodeText = Unicode +# dump location of non-unicode string +from sqlalchemy import util +import traceback +oldWarn = util.warn +def newWarn(*args, **kwargs): + traceback.print_stack() + oldWarn(*args, **kwargs) +util.warn = newWarn + + + metadata = MetaData() # this class assumes the provided session is called with transactional=False