Hello,
I am currently investigating whether all my current Python work/scripts
will work with Python 3 (v3.3.0). And I am running into an issue which
seems to be related to this. I have made an example (or actually took
the one from the documentation) to illustrate the issue.
Currently running
On Fri, Feb 8, 2013, at 11:47, Thijs Engels wrote:
Is it correct to assume this would be related to SQLAlchemy?
I forgot to mention that a raw insert using cx_Oracle directly is fine
for both Python 2.7 and 3.3.
-
import cx_Oracle
connection =
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,
On Fri, Feb 8, 2013, at 15:49, Michael Bayer wrote:
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
We often use this pattern:
try:
session.query().one()
except orm_exc.NoResultFound:
gracefully deal with it
If the query() execution causes an autoflush, I just want to make sure that
an autoflush will never raise orm_exc.NoResultFound, or we could be
catching the wrong error. Were that
On Fri, Feb 8, 2013, at 18:43, Michael Bayer wrote:
On Feb 8, 2013, at 12:31 PM, Michael Bayer wrote:
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.