On Feb 8, 2013, at 10:29 AM, Thijs Engels wrote:
>
> Works fine with both Python 2.7 and 3.3. Running the (even more) direct
> statement as in your email end up with the same results.
>
> More than willing to try things out if the feedback on this is
> considered useful.
>
your program will work right now if you pass auto_setinputsizes=False to
create_engine().
An encoding step in setinputsizes() will be removed in the SQLAlchemy dialect
to resolve.
Here is a cx_Oracle script that reproduces the error - however it only
reproduces it sporadically.
import cx_Oracle
connection = cx_Oracle.Connection("scott/tiger@localhost:1521/xe")
cursor = connection.cursor()
cursor.execute("create table users (id integer primary key, name varchar(20), "
"extra varchar(20) not null)")
try:
# this should be 'id', not b'id'. But strange that
# it fails only sporadically.
cursor.setinputsizes(**{b'id': cx_Oracle.NUMBER})
cursor.execute(
"INSERT INTO users (id, name, extra) VALUES (:id, :name, :extra)",
{'extra': 2013, 'id': 2, 'name': 'Ed Jones'}
)
finally:
cursor.execute("drop table users")
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.