1. Michael Bayer
  2. sqlalchemy
  3. Issues


Issue #2707 new

stacklevel for SAWarning about Unicode types

Domen Kožar
created an issue

When passing strings to a Unicode type, sqlalchemy complains: lib/python2.7/site-packages/SQLAlchemy-0.8.0-py2.7-linux-x86_64.egg/sqlalchemy/engine/default.py:455: SAWarning: Unicode type received non-unicode bind param value.

Those warnings are hard to debug. Changing stacklevel to 17 reports the stack correctly, but I'm not sure if stacklevel is dynamic.

Comments (4)

  1. Domen Kožar reporter

    Since it's 17 stacks, it probably changes quickly and there might be multiple paths to get to that warning. No idea how to do that dynamically, Googling doesn't reveal much.

  2. Log in to comment