Thread: [cx-oracle-users] cx_Oracle 5.2
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2015-06-21 03:40:12
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle for Python 2.x and 3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? http://cx-oracle.sourceforge.net What's new? http://cx-oracle.readthedocs.org/en/latest/releasenotes.html |
From: Christopher J. <chr...@or...> - 2015-06-22 19:56:16
|
On 6/20/15 8:40 PM, Anthony Tuininga wrote: > What iscx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle > for Python 2.x and3.x and conforms to the Python database API 2.0 > specifications with a number of enhancements. > > Where do I get it? > > http://cx-oracle.sourceforge.net <http://cx-oracle.sourceforge.net/> > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html Thank you Anthony! Also thanks to Avinash @ Oracle and to all the other contributors and users of cx_Oracle. Chris -- http://twitter.com/ghrd |
From: Mike B. <mi...@zz...> - 2015-07-23 01:13:30
|
On 6/20/15 11:40 PM, Anthony Tuininga wrote: > What iscx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle for Python 2.x and3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. > > > Where do I get it? > > http://cx-oracle.sourceforge.net <http://cx-oracle.sourceforge.net/> > > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html One of my users is seeing issues with SQL result sets returning zero rows when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a simple reproduction case, and it also involves SQLAlchemy which I know rules out it being a simple test case for cx_Oracle developers. However, I'm hoping that some other cx_Oracle users eventually can confirm some similar issue to shed some light on it, so consider this post to be at least a flag that something has changed for at least one user: https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: William W. L. K. <wil...@gm...> - 2015-07-23 17:35:10
|
I have managed to reproduce that accidentally while working on one of my projects. [root@POC-DB]# python Python 2.6.6 (r266:84292, Apr 11 2011, 15:50:32) [GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle >>> connection = cx_Oracle.connect("oracle/oracle@poc-db") >>> cursor = connection.cursor() ... ... ... >>> cursor.execute(str(my_query1)) <cx_Oracle.Cursor on <cx_Oracle.Connection to oracle@poc-db>> >>> cnum_check1 = cursor.fetchall()[0][0] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: list index out of range >>> Please advise. Will On Thu, Jul 23, 2015 at 9:13 AM, Mike Bayer <mi...@zz...> wrote: > > > On 6/20/15 11:40 PM, Anthony Tuininga wrote: > > What is cx_Oracle? > cx_Oracle is a Python extension module that enables access to Oracle for Python 2.x and 3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. > > > Where do I get it? > http://cx-oracle.sourceforge.net > > > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html > > > One of my users is seeing issues with SQL result sets returning zero rows > when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a > simple reproduction case, and it also involves SQLAlchemy which I know > rules out it being a simple test case for cx_Oracle developers. However, > I'm hoping that some other cx_Oracle users eventually can confirm some > similar issue to shed some light on it, so consider this post to be at > least a flag that something has changed for at least one user: > > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > cx-oracle-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Doug H. <djn...@gm...> - 2015-07-23 18:04:18
|
Try changing your test case to use a byte string instead of a unicode string. Change cursor = session.execute('SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {'param_1':1}) to cursor = session.execute(b'SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {b'param_1':1} I suspect you may have a problem with mixing unicode and byte strings. You don't mention which Python version you use but the string prefix suggests you are using 3.x. Are you using a recent version, e.g. 3.4? Note that the log does not show the results of the SA internal queries that try to find out how strings are returned. You mention trying older versions of SA, but have you tried newer versions? Do you env variable for LANG or LC_*? Also, is the Oracle server version the same as the client version? You might also check the values of the NLS character set parameters. Hope this helps. Doug On 22 July 2015 at 19:13, Mike Bayer <mi...@zz...> wrote: > > > On 6/20/15 11:40 PM, Anthony Tuininga wrote: > > What is cx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle for > Python 2.x and 3.x and conforms to the Python database API 2.0 > specifications with a number of enhancements. > > > Where do I get it? > > http://cx-oracle.sourceforge.net > > > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html > > > One of my users is seeing issues with SQL result sets returning zero rows > when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a > simple reproduction case, and it also involves SQLAlchemy which I know rules > out it being a simple test case for cx_Oracle developers. However, I'm > hoping that some other cx_Oracle users eventually can confirm some similar > issue to shed some light on it, so consider this post to be at least a flag > that something has changed for at least one user: > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- Doug Henderson, Calgary, Alberta, Canada |
From: Mike B. <mi...@zz...> - 2015-07-23 19:41:57
|
On 7/23/15 12:24 PM, Doug Henderson wrote: > Try changing your test case to use a byte string instead of a unicode > string. Change > > cursor = session.execute('SELECT "SCHEMA_lot_lot_key", > "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS > "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" > \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {'param_1':1}) > > to > > cursor = session.execute(b'SELECT "SCHEMA_lot_lot_key", > "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS > "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" > \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {b'param_1':1} > > > I suspect you may have a problem with mixing unicode and byte strings. > You don't mention which Python version you use but the string prefix > suggests you are using 3.x. Are you using a recent version, e.g. 3.4? > > Note that the log does not show the results of the SA internal queries > that try to find out how strings are returned. Hi Doug - Thanks very much for responding. I should note that this is not my own test environment and I can't reproduce it with any Oracle environment I have access to. I'm channeling one of my users who I think has just downgraded to cx_oracle 5.1.3 to solve the issue and may or may not still be paying attention (I will ping), but if you look at the logs the user posted you can see that we are sending bytestring based queries along and by the presence of the "b''" you know this is Python 3 at least (and likely 3.3 or 3.4). That is, SQLAlchemy is encountering this error using the latter form you've posted. Below are logs posted by this user where the failure of a row to be returned is present. In SQLAlchemy, when you see queries sent as b'', that means the flag "supports_unicode_statements" is set to False on the dialect, which may or may not be the right choice for cx_oracle on Python 3, though in our own test suite we pass our suite 100% with this flag set to False for cx_oracle + py3k. The parameter key is also a bytestring. So in one case we have this: where we see the cursor.description comes back, but no rows: 2015-07-20 13:49:41,436 INFO sqlalchemy.engine.base.Engine b'SELECT USER FROM DUAL' 2015-07-20 13:49:41,437 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:49:41,438 DEBUG sqlalchemy.engine.base.Engine Col ('USER',) 2015-07-20 13:49:41,439 DEBUG sqlalchemy.engine.base.Engine Row ('DPUSER',) 2015-07-20 13:49:41,439 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60 CHAR)) AS anon_1 FROM DUAL 2015-07-20 13:49:41,439 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:49:41,440 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS NVARCHAR2(60)) AS anon_1 FROM DUAL 2015-07-20 13:49:41,440 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:49:41,443 INFO sqlalchemy.engine.base.Engine BEGIN (implicit) 2015-07-20 13:49:41,444 INFO sqlalchemy.engine.base.Engine b'SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1' 2015-07-20 13:49:41,444 INFO sqlalchemy.engine.base.Engine {b'param_1': 1} 2015-07-20 13:49:41,445 DEBUG sqlalchemy.engine.base.Engine Col ('SCHEMA_lot_lot_key', 'SCHEMA_lot_lot_id') the user also pastes the identical series of steps on a different run, however there *is* a result. The user observes that whether or not a result is returned is a 50% random decision. If they downgrade to cx_oracle 5.1.3, the failures disappear: 2015-07-20 13:52:27,579 INFO sqlalchemy.engine.base.Engine b'SELECT USER FROM DUAL' 2015-07-20 13:52:27,579 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:52:27,580 DEBUG sqlalchemy.engine.base.Engine Col ('USER',) 2015-07-20 13:52:27,581 DEBUG sqlalchemy.engine.base.Engine Row ('DPUSER',) 2015-07-20 13:52:27,581 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60 CHAR)) AS anon_1 FROM DUAL 2015-07-20 13:52:27,581 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:52:27,583 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS NVARCHAR2(60)) AS anon_1 FROM DUAL 2015-07-20 13:52:27,583 INFO sqlalchemy.engine.base.Engine {} 2015-07-20 13:52:27,586 INFO sqlalchemy.engine.base.Engine BEGIN (implicit) 2015-07-20 13:52:27,587 INFO sqlalchemy.engine.base.Engine b'SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1' 2015-07-20 13:52:27,587 INFO sqlalchemy.engine.base.Engine {b'param_1': 1} 2015-07-20 13:52:27,588 DEBUG sqlalchemy.engine.base.Engine Col ('SCHEMA_lot_lot_key', 'SCHEMA_lot_lot_id') 2015-07-20 13:52:27,588 DEBUG sqlalchemy.engine.base.Engine Row (1581, 'S9343.S') what would be most helpful here would be someone with very detailed knowledge of cx_oracle's changes between 5.1.3 and 5.2 which could in any way result in the result rows for a statement going missing. > > You mention trying older versions of SA, but have you tried newer versions? > > Do you env variable for LANG or LC_*? Also, is the Oracle server > version the same as the client version? You might also check the > values of the NLS character set parameters. > > Hope this helps. > Doug > > On 22 July 2015 at 19:13, Mike Bayer <mi...@zz...> wrote: >> >> On 6/20/15 11:40 PM, Anthony Tuininga wrote: >> >> What is cx_Oracle? >> >> cx_Oracle is a Python extension module that enables access to Oracle for >> Python 2.x and 3.x and conforms to the Python database API 2.0 >> specifications with a number of enhancements. >> >> >> Where do I get it? >> >> http://cx-oracle.sourceforge.net >> >> >> >> What's new? >> >> http://cx-oracle.readthedocs.org/en/latest/releasenotes.html >> >> >> One of my users is seeing issues with SQL result sets returning zero rows >> when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a >> simple reproduction case, and it also involves SQLAlchemy which I know rules >> out it being a simple test case for cx_Oracle developers. However, I'm >> hoping that some other cx_Oracle users eventually can confirm some similar >> issue to shed some light on it, so consider this post to be at least a flag >> that something has changed for at least one user: >> >> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > |
From: Shai B. <sh...@pl...> - 2015-07-23 20:06:34
|
On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > The user is running on Windows with Oracle 11.1 client. The first question that comes to mind is, did they compile cx_Oracle themselves? If not, perhaps the issue is caused by running a cx_Oracle compiled against Oracle 11.2 client libs, against a 11.1 client installation? AFAIK you can no longer download 11.1 from Oracle, that version has been EOL'd I think. Shai. |
From: Mike B. <mi...@zz...> - 2015-07-24 01:43:37
|
On 7/23/15 4:06 PM, Shai Berger wrote: > On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: >> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >> > The user is running on Windows with Oracle 11.1 client. The first question > that comes to mind is, did they compile cx_Oracle themselves? If not, > perhaps the issue is caused by running a cx_Oracle compiled against > Oracle 11.2 client libs, against a 11.1 client installation? > > AFAIK you can no longer download 11.1 from Oracle, that version > has been EOL'd I think. great catch! I've asked the user for more information, but if I don't get a response I'll likely close the issue based on lack of information. > > Shai. > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: vijchti <rch...@gm...> - 2015-07-27 20:35:16
|
Shai Berger <shai@...> writes: > > On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: > > > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst- sometimes-returns-none > > > The user is running on Windows with Oracle 11.1 client. The first question > that comes to mind is, did they compile cx_Oracle themselves? If not, > perhaps the issue is caused by running a cx_Oracle compiled against > Oracle 11.2 client libs, against a 11.1 client installation? > > AFAIK you can no longer download 11.1 from Oracle, that version > has been EOL'd I think. > > Shai. > > ---------------------------------------------------------------------- -------- > Hello Shai, I'm the SA user that originally reported this issue. We did not compile cx_Oracle ourselves. Instead, we used the precompiled version available on PyPI here: https://pypi.python.org/packages/3.4/c/cx_Oracle/cx_Oracle-5.2- 11g.win32-py3.4.exe#md5=63137306c4fd292438a693dbce0a801d The replacement version was also downloaded from PyPI: https://pypi.python.org/packages/3.4/c/cx_Oracle/cx_Oracle-5.1.3- 11g.win32-py3.4.exe#md5=1b8438c3b61bc2c026bcff219a9c0214 We'll compile our own version for testing and let you know the results. Vijchti |
From: vijchti <rch...@gm...> - 2015-07-27 21:10:34
|
Okay, we've compiled our own version of 5.2 and continue to experience the original issue. Any other ideas? |
From: Mike B. <mi...@zz...> - 2015-07-28 18:11:32
|
OK, to continue this, I have *more* users reporting issues with cx_Oracle 5.2 on Python 3 which disappear when they downgrade to 5.1.3. At this point I am expecting many more user issues with cx_Oracle 5.2, as whether it has something to do with build mis-matches or what, it is either a mistake that is suddenly very easy to make by an end user, something SQLAlchemy is doing which is suddenly not compatible with cx_Oracle 5.2, or a bug in cx_Oracle itself. For this user, he is receiving random "cannot insert NULL into <some schema / table / column>" errors, where the column is different each time. Log output of SQL emitted again shows it emitted as bytestrings and the values are definitely present. This user's log output can be seen in the thread at https://groups.google.com/forum/#!topic/sqlalchemy/OTwV1GZwgQo. Again, if a cx_Oracle developer could come up with a concrete reason why these different-seeming errors are suddenly appearing, that would be helpful. On 7/23/15 9:43 PM, Mike Bayer wrote: > > On 7/23/15 4:06 PM, Shai Berger wrote: >> On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: >>> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >>> >> The user is running on Windows with Oracle 11.1 client. The first question >> that comes to mind is, did they compile cx_Oracle themselves? If not, >> perhaps the issue is caused by running a cx_Oracle compiled against >> Oracle 11.2 client libs, against a 11.1 client installation? >> >> AFAIK you can no longer download 11.1 from Oracle, that version >> has been EOL'd I think. > great catch! I've asked the user for more information, but if I don't > get a response I'll likely close the issue based on lack of information. > > > > >> Shai. >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Christopher J. <chr...@or...> - 2015-07-29 03:33:33
|
Is it still an issue? I can see comments "That did it" and "Glad it worked out" in the SQLAlchemy thread - was that a resolution with 5.2 or from reverting to 5.1.3? If it's still an issue, then post a currently reproducible test case & the SQL to create the schema. Knowing Oracle client library & DB version numbers, as well as platform and environment settings, including NLS values would help. Chris On 29/07/2015 4:11 am, Mike Bayer wrote: > OK, to continue this, I have *more* users reporting issues with > cx_Oracle 5.2 on Python 3 which disappear when they downgrade to 5.1.3. > At this point I am expecting many more user issues with cx_Oracle 5.2, > as whether it has something to do with build mis-matches or what, it is > either a mistake that is suddenly very easy to make by an end user, > something SQLAlchemy is doing which is suddenly not compatible with > cx_Oracle 5.2, or a bug in cx_Oracle itself. > > For this user, he is receiving random "cannot insert NULL into <some > schema / table / column>" errors, where the column is different each > time. Log output of SQL emitted again shows it emitted as bytestrings > and the values are definitely present. > > This user's log output can be seen in the thread at > https://groups.google.com/forum/#!topic/sqlalchemy/OTwV1GZwgQo. > > Again, if a cx_Oracle developer could come up with a concrete reason why > these different-seeming errors are suddenly appearing, that would be > helpful. > > > > On 7/23/15 9:43 PM, Mike Bayer wrote: >> >> On 7/23/15 4:06 PM, Shai Berger wrote: >>> On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: >>>> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >>>> >>> The user is running on Windows with Oracle 11.1 client. The first question >>> that comes to mind is, did they compile cx_Oracle themselves? If not, >>> perhaps the issue is caused by running a cx_Oracle compiled against >>> Oracle 11.2 client libs, against a 11.1 client installation? >>> >>> AFAIK you can no longer download 11.1 from Oracle, that version >>> has been EOL'd I think. >> great catch! I've asked the user for more information, but if I don't >> get a response I'll likely close the issue based on lack of information. >> >> >> >> >>> Shai. >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- http://twitter.com/ghrd <# |
From: Mike B. <mi...@zz...> - 2015-07-29 21:45:35
|
On 7/28/15 11:33 PM, Christopher Jones wrote: > > Is it still an issue? I can see comments "That did it" and "Glad it > worked out" in the SQLAlchemy thread - was that a resolution with 5.2 > or from reverting to 5.1.3? > > If it's still an issue, then post a currently reproducible test case & > the SQL to create the schema. Knowing Oracle client library & DB > version numbers, as well as platform and environment settings, > including NLS values would help. So the issue is that cx_Oracle 5.2 added a type called "UNICODE", which we specifically looked for it being absent in order to detect whether or not the library is using "unicode mode", which is a legacy py2K mode introduced in early cx_Oracle 5 versions. Because 5.2 adds this, we'd get the impression we were *not* in unicode mode and we'd not correctly set our "convert unicode" flags for py3K. All the b'' strings we see in these logs are *incorrect* - SQLAlchemy should be sending these as Python unicode objects, and that's what we did for 5.1.3. So issue resolved, thanks for all the help ! > > Chris > > On 29/07/2015 4:11 am, Mike Bayer wrote: >> OK, to continue this, I have *more* users reporting issues with >> cx_Oracle 5.2 on Python 3 which disappear when they downgrade to 5.1.3. >> At this point I am expecting many more user issues with cx_Oracle 5.2, >> as whether it has something to do with build mis-matches or what, it is >> either a mistake that is suddenly very easy to make by an end user, >> something SQLAlchemy is doing which is suddenly not compatible with >> cx_Oracle 5.2, or a bug in cx_Oracle itself. >> >> For this user, he is receiving random "cannot insert NULL into <some >> schema / table / column>" errors, where the column is different each >> time. Log output of SQL emitted again shows it emitted as bytestrings >> and the values are definitely present. >> >> This user's log output can be seen in the thread at >> https://groups.google.com/forum/#!topic/sqlalchemy/OTwV1GZwgQo. >> >> Again, if a cx_Oracle developer could come up with a concrete reason why >> these different-seeming errors are suddenly appearing, that would be >> helpful. >> >> >> >> On 7/23/15 9:43 PM, Mike Bayer wrote: >>> >>> On 7/23/15 4:06 PM, Shai Berger wrote: >>>> On Thursday 23 July 2015 04:13:20 Mike Bayer wrote: >>>>> https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none >>>>> >>>>> >>>> The user is running on Windows with Oracle 11.1 client. The first >>>> question >>>> that comes to mind is, did they compile cx_Oracle themselves? If not, >>>> perhaps the issue is caused by running a cx_Oracle compiled against >>>> Oracle 11.2 client libs, against a 11.1 client installation? >>>> >>>> AFAIK you can no longer download 11.1 from Oracle, that version >>>> has been EOL'd I think. >>> great catch! I've asked the user for more information, but if I don't >>> get a response I'll likely close the issue based on lack of >>> information. >>> >>> >>> >>> >>>> Shai. >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> cx-oracle-users mailing list >>>> cx-...@li... >>>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > |
From: Christopher J. <chr...@or...> - 2015-08-01 00:45:48
|
On 30/07/2015 7:44 am, Mike Bayer wrote: > > > On 7/28/15 11:33 PM, Christopher Jones wrote: >> >> Is it still an issue? I can see comments "That did it" and "Glad it >> worked out" in the SQLAlchemy thread - was that a resolution with 5.2 >> or from reverting to 5.1.3? >> >> If it's still an issue, then post a currently reproducible test case & >> the SQL to create the schema. Knowing Oracle client library & DB >> version numbers, as well as platform and environment settings, >> including NLS values would help. > So the issue is that cx_Oracle 5.2 added a type called "UNICODE", which we specifically looked for it being absent in order to detect whether or not > the library is using "unicode mode", which is a legacy py2K mode introduced in early cx_Oracle 5 versions. Because 5.2 adds this, we'd get the > impression we were *not* in unicode mode and we'd not correctly set our "convert unicode" flags for py3K. All the b'' strings we see in these logs are > *incorrect* - SQLAlchemy should be sending these as Python unicode objects, and that's what we did for 5.1.3. > > So issue resolved, thanks for all the help ! Thanks for the clarification. Chris -- http://twitter.com/ghrd |