On Feb 8, 2013, at 5:47 AM, Thijs Engels wrote:

> 
> Running this script on 3.3 results in this error message:
> 
> sqlalchemy.exc.IntegrityError: (IntegrityError) ORA-01400: cannot insert
> NULL into ("SCOTT"."USERS"."ID")
> 'INSERT INTO users (id, name, extra) VALUES (:id, :name, :extra)'
> {'extra': 2013, 'name': 'Ed Jones', 'id': 2}
> 
> (more details available at request)
> 
> This seems odd, as the insert statement indicates the column id is
> assigned with a correct value (2).
> 
> Same script, again Python 3, but now with SQLite (in memory): no errors.
> Using Python 2 (v2.7.3) and Oracle; again no errors.
> 
> Is it correct to assume this would be related to SQLAlchemy?

I've not attempted running cx_oracle itself with Python 3 at all, and haven't 
made any attempt to test SQLAlchemy's dialect with python 3 + cx_Oracle.

What happens if you run a plain cx_Oracle script in Python 3 that runs the 
equivalent statement, that is,


import cx_Oracle
conn = cx_Oracle.connect(username, password, dsn)
cursor = conn.cursor()
cursor.execute("insert into users (id, name, extra) values (:id, :name, 
:extra)", {"extra":2013, "name": "Ed Jones", "id": 2})



-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to