Hey,

you dan do:

  import warnings
  warnings.simplefilter('|error|')

This will raise an exception. and give you a stacktrace on where the Unicode warnign happened.

On 04/22/2015 09:48 AM, Pavel S wrote:
Hi,

it happened to me many times during development, mainly when used custom column types, that I passed wrong type of value to the query.

Then the the following warning was emitted:|

||
SAWarning: Unicodetype received non-unicode bindparam value
|
The problem with such warning is it does not say
1) were the problem occurred (the line number points to somewhere in sqlalchemy and not to my application) 2) what was the value which caused the problem ( repr() of that value would be nice to have)

I always had to hack sqlalchemy/sql/sqltypes.py and add print value before the warning is emitted to actually see what was wrong.

Is there any convenient way how to solve such issue?

--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

--

_*check out pointcloud9.com*_ <http://pointcloud9.com/>

**Sebastian Elsner - Pipeline Techincal Director - RISE*

t: +49 30 20180300 [email protected] _ <mailto:[email protected]>
f: +49 30 61651074 _www.risefx.com_ <http://www.risefx.com/>*

*RISE FX GmbH*
*Schlesische Strasse 28, 10997 Berlin
An der Schanz 1A, 50735 Köln
Büchsenstraße 20, 70174 Stuttgart
Gumpendorferstrasse 55, 1060 Wien
Geschaeftsfuehrer: Sven Pannicke, Robert Pinnow
Handelsregister Berlin HRB 106667 B*

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to