if you're dealing with cross-types with SQLite, build a TypeDecorator that 
gives you the behavior you want.

http://www.sqlalchemy.org/docs/core/types.html#augmenting-existing-types

Build it based on String and do the kinds of conditional numeric conversion you 
want.



On Jul 7, 2011, at 2:50 PM, Fabrizio Pollastri wrote:

> When I read a record where a field declared as numeric is a blank
> string, sqlalchemy gives the error "ValueError: could not convert
> string to float:        ". Instead, I wish to get something like NaN
> or None. I am using sqlite.
> 
> TIA,
> Fabrizio
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to