cx-oracle-users Mailing List for cx_Oracle (Page 58)
Brought to you by:
atuining
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Catherine D. <cat...@gm...> - 2010-01-22 18:58:07
|
I honestly don't know whether this problem traces back to cx_Oracle or to my Vista configuration, but I thought I'd let you know. I have an Oracle 11g client installed on Vista Enterprise SP1 with User Access Control enabled. Python 2.6 is installed under c:\Python2.6. When I run the 11g / 2.6 .msi, the installer suggests installing under c:\Python26; I accept, and everything reports successful installation. However, trying to import cx_Oracle gives "ImportError: No module named cx_Oracle". Probing around, I find cx_Oracle - alone among all the modules I've installed - in c:\Lib instead of c:\Python26\Lib. I manually defined a PYTHONPATH including c:\Lib, and then `import cx_Oracle` works as expected. So I found a workaround; it's just weird, and I think it's the first time in 5+ years of Python that I've had to set PYTHONPATH manually. Has anybody else seen this? Thanks, -- - Catherine http://catherinedevlin.blogspot.com/ *** PyCon * Feb 17-25, 2010 * Atlanta, GA * us.pycon.org *** |
From: Pablo S. <pab...@gm...> - 2010-01-21 15:01:33
|
Hi Floris thank you for your response, here are the information you requested: gcc 4.2.0 AIX 5300-10-01-0921 Oracle 10.2.0.3 cx_Oracle 5.0.2 Regards Pablo On Thu, Jan 21, 2010 at 3:23 PM, Floris Bruynooghe <flo...@gm...> wrote: > Hi > > On Thu, Jan 21, 2010 at 12:33:53PM +0100, Pablo Stapff wrote: >> I found this error when compiling cx_Oracle for IBM/AIX. >> >> Undefined Symbol OCIPing > > Which version of AIX is this, which compiler do you use and what > version of Oracle are you compiling against? I've build cx_Oracle on > AIX 5.3 TL07 and TL08 using gcc 4.2.0 using Oracle instant client > 11.1.0.7.0 and it works successfully. > > Regards > Floris > > > -- > Debian GNU/Linux -- The Power of Freedom > www.debian.org | www.gnu.org | www.kernel.org > |
From: Floris B. <flo...@gm...> - 2010-01-21 14:59:40
|
Hi On Thu, Jan 21, 2010 at 12:33:53PM +0100, Pablo Stapff wrote: > I found this error when compiling cx_Oracle for IBM/AIX. > > Undefined Symbol OCIPing Which version of AIX is this, which compiler do you use and what version of Oracle are you compiling against? I've build cx_Oracle on AIX 5.3 TL07 and TL08 using gcc 4.2.0 using Oracle instant client 11.1.0.7.0 and it works successfully. Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org |
From: Anthony T. <ant...@gm...> - 2010-01-21 14:59:27
|
Hi, I believe that is a bug in the Oracle port to that platform. You can workaround it by simply removing the method Connection_Ping() and all references to it (2 other lines in that same file). As for whether it will be fixed -- ask Oracle. :-) I suspect it has long since been fixed in another release but since I don't use/have access to a computer running AIX I can't really say for certain. Perhaps someone else who does use AIX can comment? Anthony On Thu, Jan 21, 2010 at 4:33 AM, Pablo Stapff <pab...@gm...> wrote: > Hi all > > I found this error when compiling cx_Oracle for IBM/AIX. > > Undefined Symbol OCIPing > > I found the same problem on an old post from 2007 (see below), the > workaround seems to be to comment the call to OCIPing in the > Connection.c file, but it's not clear for me which lines shall be > commented out. > > Maybe can someone send to me an example? > > Will this problem be fixed in the future? > > Thanks in advance > Pablo > > ------------- Code from Connection.c > -------------------------------------------------------------------------------- > > > #ifdef ORACLE_10GR2 > //----------------------------------------------------------------------------- > // Connection_Ping() > // Makes a round trip call to the server to confirm that the connection and > // server are active. > //----------------------------------------------------------------------------- > static PyObject *Connection_Ping( > udt_Connection *self, // connection > PyObject* args) // arguments > { > sword status; > > if (Connection_IsConnected(self) < 0) > return NULL; > status = OCIPing(self->handle, self->environment->errorHandle, > OCI_DEFAULT); > if (Environment_CheckForError(self->environment, status, > "Connection_Ping()") < 0) > return NULL; > Py_INCREF(Py_None); > return Py_None; > } > > > ----------------Old Post > ----------------------------------------------------------------------------- > > Re: [cx-oracle-users] missing OCIPing for cx_Oracle 4.4 on AIX > From: Anthony Tuininga <anthony.tuininga@gm...> - 2008-07-03 13:49 > Right. You'll have to comment it out of the code for now until they > fix this as the bug comments make clear. Sorry about that. > > On Wed, Jul 2, 2008 at 10:54 PM, Tamás Gulácsi > <gt-dev@gt...> wrote: >> Hi Anthony, >> >> > https://metalink.oracle.com/metalink/plsql/f?p=130:15:4462378827597270936::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,5759845,1,1,1,helvetica >> >> Bug No: 5759845 >> >> Tamás Gulácsi >> >> 2008/7/2 <cx-oracle-users-request@li...>: >>> >>> Send cx-oracle-users mailing list submissions to >>> cx-oracle-users@li... >>> >>> To subscribe or unsubscribe via the World Wide Web, visit >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> or, via email, send a message with subject or body 'help' to >>> cx-oracle-users-request@li... >>> >>> You can reach the person managing the list at >>> cx-oracle-users-owner@li... >>> >>> When replying, please edit your Subject line so it is more specific >>> than "Re: Contents of cx-oracle-users digest..." >>> >>> > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Pablo S. <pab...@gm...> - 2010-01-21 11:40:53
|
Hi all I found this error when compiling cx_Oracle for IBM/AIX. Undefined Symbol OCIPing I found the same problem on an old post from 2007 (see below), the workaround seems to be to comment the call to OCIPing in the Connection.c file, but it's not clear for me which lines shall be commented out. Maybe can someone send to me an example? Will this problem be fixed in the future? Thanks in advance Pablo ------------- Code from Connection.c -------------------------------------------------------------------------------- #ifdef ORACLE_10GR2 //----------------------------------------------------------------------------- // Connection_Ping() // Makes a round trip call to the server to confirm that the connection and // server are active. //----------------------------------------------------------------------------- static PyObject *Connection_Ping( udt_Connection *self, // connection PyObject* args) // arguments { sword status; if (Connection_IsConnected(self) < 0) return NULL; status = OCIPing(self->handle, self->environment->errorHandle, OCI_DEFAULT); if (Environment_CheckForError(self->environment, status, "Connection_Ping()") < 0) return NULL; Py_INCREF(Py_None); return Py_None; } ----------------Old Post ----------------------------------------------------------------------------- Re: [cx-oracle-users] missing OCIPing for cx_Oracle 4.4 on AIX From: Anthony Tuininga <anthony.tuininga@gm...> - 2008-07-03 13:49 Right. You'll have to comment it out of the code for now until they fix this as the bug comments make clear. Sorry about that. On Wed, Jul 2, 2008 at 10:54 PM, Tamás Gulácsi <gt-dev@gt...> wrote: > Hi Anthony, > > https://metalink.oracle.com/metalink/plsql/f?p=130:15:4462378827597270936::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,5759845,1,1,1,helvetica > > Bug No: 5759845 > > Tamás Gulácsi > > 2008/7/2 <cx-oracle-users-request@li...>: >> >> Send cx-oracle-users mailing list submissions to >> cx-oracle-users@li... >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> or, via email, send a message with subject or body 'help' to >> cx-oracle-users-request@li... >> >> You can reach the person managing the list at >> cx-oracle-users-owner@li... >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of cx-oracle-users digest..." >> >> |
From: Anthony T. <ant...@gm...> - 2010-01-07 14:42:29
|
Hi, First, I find it hard to read your query so its hard to see what is going on for sure. Can you clean it up a bit? From what I can see you are trying to get a particular page of a query by using rownum? It would be nice if you could try the same thing with the cx_Oracle test data or provide the create table statements and insert statements for your own data that demonstrate the problem. I've never personally had the difficulties you are having and I've done a fair amount with cx_Oracle. Second, can you specify which version of cx_Oracle, which platform and which version of Oracle client and Oracle server you are using? Thanks. Anthony On Thu, Jan 7, 2010 at 3:34 AM, Jonathan Gardner <jga...@jo...> wrote: > I have discovered cursor.setinputsizes is causing some queries with > rownum clauses to silently fail, behaving as if there is no data. > >>>> import datetime >>>> q = 'SELECT ddd_marketplace_id, ddd_deal_id \nFROM (SELECT ddd_marketplace_id, ddd_deal_id, ROWNUM AS ora_rn \nFROM (SELECT ddd.marketplace_id AS ddd_marketplace_id, ddd.deal_id AS ddd_deal_id \nFROM ddd \nWHERE ddd.marketplace_id = :marketplace_id_1 AND ddd.post_date < :post_date_1 AND ddd.expiration_date > :expiration_date_1 AND ddd.deal_type = :deal_type_1) \nWHERE ROWNUM <= :ROWNUM_1) \nWHERE ora_rn > :ora_rn_1' >>>> p = {'post_date_1': datetime.datetime(2010, 1, 8, 0, 0), 'expiration_date_1': datetime.datetime(2010, 1, 7, 0, 0), 'ora_rn_1': 0, 'ROWNUM_1': 10, 'marketplace_id_1': 1.0, 'deal_type_1': 'B'} >>>> cursor = conn.cursor() >>>> cursor.setinputsizes( > marketplace_id_1=cx_Oracle.NUMBER, > deal_type_1=cx_Oracle.STRING, > post_date_1=cx_Oracle.DATETIME, > expiration_date_1=cx_Oracle.DATETIME) >>>> cursor.execute(q, p) >>>> cursor.fetchall() > [] > > Removing the setinputsizes call will cause a fresh query to succeed. > > Also, removing the ROWNUM_1 and ora_rn_1 bits works with setinputsizes. > >>>> q = 'SELECT ddd.marketplace_id AS ddd_marketplace_id, ddd.deal_id AS ddd_deal_id \nFROM ddd \nWHERE ddd.marketplace_id = :marketplace_id_1 AND ddd.post_date < :post_date_1 AND ddd.expiration_date > :expiration_date_1 AND ddd.deal_type = :deal_type_1' >>>> p = {'post_date_1': datetime.datetime(2010, 1, 8, 0, 0), 'expiration_date_1': datetime.datetime(2010, 1, 7, 0, 0), 'marketplace_id_1': 1.0, 'deal_type_1': 'B'} >>>> cursor = conn.cursor() >>>> cursor.setinputsizes( > marketplace_id_1=cx_Oracle.NUMBER, > deal_type_1=cx_Oracle.STRING, > post_date_1=cx_Oracle.DATETIME, > expiration_date_1=cx_Oracle.DATETIME) >>>> cursor.execute(q, p) >>>> cursor.fetchall() > [... expected results ...] > > > This is really, really odd. Is this a bug with the oracle libs or a > problem with cx_Oracle? > > -- > Jonathan Gardner > jga...@jo... > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Jonathan G. <jga...@jo...> - 2010-01-07 10:40:58
|
I have discovered cursor.setinputsizes is causing some queries with rownum clauses to silently fail, behaving as if there is no data. >>> import datetime >>> q = 'SELECT ddd_marketplace_id, ddd_deal_id \nFROM (SELECT ddd_marketplace_id, ddd_deal_id, ROWNUM AS ora_rn \nFROM (SELECT ddd.marketplace_id AS ddd_marketplace_id, ddd.deal_id AS ddd_deal_id \nFROM ddd \nWHERE ddd.marketplace_id = :marketplace_id_1 AND ddd.post_date < :post_date_1 AND ddd.expiration_date > :expiration_date_1 AND ddd.deal_type = :deal_type_1) \nWHERE ROWNUM <= :ROWNUM_1) \nWHERE ora_rn > :ora_rn_1' >>> p = {'post_date_1': datetime.datetime(2010, 1, 8, 0, 0), 'expiration_date_1': datetime.datetime(2010, 1, 7, 0, 0), 'ora_rn_1': 0, 'ROWNUM_1': 10, 'marketplace_id_1': 1.0, 'deal_type_1': 'B'} >>> cursor = conn.cursor() >>> cursor.setinputsizes( marketplace_id_1=cx_Oracle.NUMBER, deal_type_1=cx_Oracle.STRING, post_date_1=cx_Oracle.DATETIME, expiration_date_1=cx_Oracle.DATETIME) >>> cursor.execute(q, p) >>> cursor.fetchall() [] Removing the setinputsizes call will cause a fresh query to succeed. Also, removing the ROWNUM_1 and ora_rn_1 bits works with setinputsizes. >>> q = 'SELECT ddd.marketplace_id AS ddd_marketplace_id, ddd.deal_id AS ddd_deal_id \nFROM ddd \nWHERE ddd.marketplace_id = :marketplace_id_1 AND ddd.post_date < :post_date_1 AND ddd.expiration_date > :expiration_date_1 AND ddd.deal_type = :deal_type_1' >>> p = {'post_date_1': datetime.datetime(2010, 1, 8, 0, 0), 'expiration_date_1': datetime.datetime(2010, 1, 7, 0, 0), 'marketplace_id_1': 1.0, 'deal_type_1': 'B'} >>> cursor = conn.cursor() >>> cursor.setinputsizes( marketplace_id_1=cx_Oracle.NUMBER, deal_type_1=cx_Oracle.STRING, post_date_1=cx_Oracle.DATETIME, expiration_date_1=cx_Oracle.DATETIME) >>> cursor.execute(q, p) >>> cursor.fetchall() [... expected results ...] This is really, really odd. Is this a bug with the oracle libs or a problem with cx_Oracle? -- Jonathan Gardner jga...@jo... |
From: Nicola P. <nic...@it...> - 2010-01-06 21:55:03
|
I am out of the office until 07/01/2010. I'm on vacation. Ask to my manager Fab...@it... or luc...@it... for a backup. Note: This is an automated response to your message "cx-oracle-users Digest, Vol 44, Issue 1" sent on 6/1/10 13:05:15. This is the only notification you will receive while this person is away. |
From: Anthony T. <ant...@gm...> - 2010-01-06 20:58:34
|
Hi, I am not aware of anything but if you know the OCISetAttr attribute that needs to be set I can probably add such support. Let me know. Anthony On Wed, Jan 6, 2010 at 6:47 AM, Gustavo Chaín Dumit <g...@0x...> wrote: > Hello! > > I have the following problem. > > -> connect () > -> cursor () > -> <unplug network cable> > -> cursor.execute () > -> ... wait .... > > Is it possible to __enable__ (may be with OciSetAttr) non-blocking > operations to set some kind of timeout ?. > > Thanks! > > -- > Gustavo Chaín Dumit > http://0xff.cl > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Gustavo C. D. <g...@0x...> - 2010-01-06 14:50:28
|
Hello! I have the following problem. -> connect () -> cursor () -> <unplug network cable> -> cursor.execute () -> ... wait .... Is it possible to __enable__ (may be with OciSetAttr) non-blocking operations to set some kind of timeout ?. Thanks! -- Gustavo Chaín Dumit http://0xff.cl |
From: Jonathan G. <jga...@jo...> - 2010-01-06 00:59:14
|
Here's a strange error I see with cx_Oracle. There are only a couple of reason why this may not work: (1) The first query is bigger (2) The first query uses a bind param with ROWNUM (3) The first query uses a bind param on both the inside and outside of select clause. Any ideas would be appreciated. Any tips on how to debug this would be appreciated as well. This query with these parameters return nothing: SELECT deal_details_displayable_1, deal_details_displayable_2, deal_details_displayable_3, deal_ details_displayable_4, deal_details_displayable_asin, deal_details_displayable_5, deal_details_displayable_price, deal_details_displayable_6, deal_details_displayable_7, deal_details_displayable_8, deal_details_displayable_9, deal_details_displayable_url, deal_details_displayable_title, deal_details_displayable_a, deal_details_displayable_b, deal_details_displayable_score, deal_details_displayable_image, deal_details_displayable_c, deal_details_displayable_d, deal_details_displayable_e, deal_details_displayable_f, deal_details_displayable_10, deal_details_displayable_11, deal_details_displayable_12, deal_details_displayable_13, deal_details_displayable_14, deal_details_displayable_15, deal_details_displayable_16 FROM (SELECT deal_details_displayable.marketplace_id AS deal_details_displayable_1, deal_details_displayable.deal_id AS deal_details_displayable_2, deal_details_displayable.deal_type AS deal_details_displayable_3, deal_details_displayable.promo_id AS deal_details_displayable_4, deal_details_displayable.asin AS deal_details_displayable_asin, deal_details_displayable.merchant_id AS deal_details_displayable_5, deal_details_displayable.price AS deal_details_displayable_price, deal_details_displayable.percent_off AS deal_details_displayable_6, deal_details_displayable.product_group_id AS deal_details_displayable_7, deal_details_displayable.post_date AS deal_details_displayable_8, deal_details_displayable.expiration_date AS deal_details_displayable_9, deal_details_displayable.url AS deal_details_displayable_url, deal_details_displayable.title AS deal_details_displayable_title, deal_details_displayable.short_description AS deal_details_displayable_a, deal_details_displayable.long_description AS deal_details_displayable_b, deal_details_displayable.score AS deal_details_displayable_score, deal_details_displayable.image AS deal_details_displayable_image, deal_details_displayable.is_asin_deal AS deal_details_displayable_c, deal_details_displayable.manual_override AS deal_details_displayable_d, deal_details_displayable.use_deal_price AS deal_details_displayable_e, deal_details_displayable.is_sold_out AS deal_details_displayable_f, deal_details_displayable.is_related_multi_asin_deal AS deal_details_displayable_10, deal_details_displayable.list_price AS deal_details_displayable_11, deal_details_displayable.pre_promo_price AS deal_details_displayable_12, deal_details_displayable.deal_state AS deal_details_displayable_13, deal_details_displayable.product_group_name AS deal_details_displayable_14, deal_details_displayable.deal_group_id AS deal_details_displayable_15, deal_details_displayable.cv_item_id AS deal_details_displayable_16 FROM deal_details_displayable WHERE deal_details_displayable.deal_type = :deal_type_1) WHERE ROWNUM <= :ROWNUM_1 {'ROWNUM_1': 10, 'deal_type_1': 'D'} This query with these parameters return all the data I expect: SELECT deal_details_displayable.marketplace_id AS deal_details_displayable_1, deal_details_displayable.deal_id AS deal_details_displayable_2, deal_details_displayable.deal_type AS deal_details_displayable_3, deal_details_displayable.promo_id AS deal_details_displayable_4, deal_details_displayable.asin AS deal_details_displayable_asin, deal_details_displayable.merchant_id AS deal_details_displayable_5, deal_details_displayable.price AS deal_details_displayable_price, deal_details_displayable.percent_off AS deal_details_displayable_6, deal_details_displayable.product_group_id AS deal_details_displayable_7, deal_details_displayable.post_date AS deal_details_displayable_8, deal_details_displayable.expiration_date AS deal_details_displayable_9, deal_details_displayable.url AS deal_details_displayable_url, deal_details_displayable.title AS deal_details_displayable_title, deal_details_displayable.short_description AS deal_details_displayable_a, deal_details_displayable.long_description AS deal_details_displayable_b, deal_details_displayable.score AS deal_details_displayable_score, deal_details_displayable.image AS deal_details_displayable_image, deal_details_displayable.is_asin_deal AS deal_details_displayable_c, deal_details_displayable.manual_override AS deal_details_displayable_d, deal_details_displayable.use_deal_price AS deal_details_displayable_e, deal_details_displayable.is_sold_out AS deal_details_displayable_f, deal_details_displayable.is_related_multi_asin_deal AS deal_details_displayable_10, deal_details_displayable.list_price AS deal_details_displayable_11, deal_details_displayable.pre_promo_price AS deal_details_displayable_12, deal_details_displayable.deal_state AS deal_details_displayable_13, deal_details_displayable.product_group_name AS deal_details_displayable_14, deal_details_displayable.deal_group_id AS deal_details_displayable_15, deal_details_displayable.cv_item_id AS deal_details_displayable_16 FROM deal_details_displayable WHERE deal_details_displayable.deal_type = :deal_type_1 {'deal_type_1': 'D'} -- Jonathan Gardner jga...@jo... |
From: Floris B. <flo...@gm...> - 2009-12-14 14:42:35
|
Hi While trying to use cx_Oracle to connect to an Oracle databse on AIX 5.3 I get a segmentation fault. I doubt it's cx_Oracle's fault since it works perfectly when running on GNU/Linux systems. I've also had a quick look in the code leading up to the segfault and can't see any reason why it should blow up. The orcale library being proprietary however doesn't really help me find what the problem could be. Hopefully someone here has more experience with debugging oracle libraries? This is the (relevant part) of the backtrace from the core dump: Program terminated with signal 11, Segmentation fault. #0 0x2285b188 in skgfsio () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) (gdb) bt #0 0x2285b188 in skgfsio () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #1 0x2285ac14 in skgfqio () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #2 0x2285551c in sdbgrfbibf_io_block_file () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #3 0x2130aa04 in dbgrfwbf_write_block_file () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #4 0x21491a90 in dbgrmflwp_write_page () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #5 0x214699a0 in dbgrmblwp_write_page () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #6 0x214e0258 in dbgrmmdwrmd_write_relation_meta_data () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #7 0x214dfea8 in dbgrmmdccf_create_contig_file () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #8 0x214e5504 in dbgrmmdcrf_create_relation_full () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #9 0x212cccf4 in dbgripcr2_create_relation_2 () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #10 0x212cc0bc in dbgripc1r_create_one_rltn () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #11 0x212ce9d8 in dbgriporc_openrel_wcreate () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #12 0x212ceaac in dbgrip_open_relation_access () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #13 0x212d1654 in dbgrip_start_iterator () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #14 0x212d2520 in dbgrip_relation_iterator () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #15 0x2144abc0 in dbgruprac_read_adrctl () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #16 0x212e9440 in dbgrsc_set_createid () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #17 0x212ea6dc in dbgrcas_create_adr_schema () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #18 0x212ea400 in dbgraid_adr_init_disk () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #19 0x212ebac4 in dbgrcaod_check_adr_ondisk () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #20 0x213d4880 in dbgrlWriteAlertDetail_int () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #21 0x213d302c in dbgrlWriteAlertDetail () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #22 0x213d2d64 in dbgrlWriteAlertText () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) ---Type <return> to continue, or q <return> to quit--- #23 0x2120b490 in nlddwrtlog () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #24 0x218440cc in nldsadrvfp () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #25 0x21842864 in nldsfprintf () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #26 0x216a9194 in kpeDbgInitError () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #27 0x216a9098 in kpeDbgGetNPDGlobal () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #28 0x216a8f34 in kpeDbgTLSInit () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #29 0x216ad934 in kpummTLSGET1 () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #30 0x216a8280 in kpeDbgProcessInit () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #31 0x216ab4b0 in kpummpin () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #32 0x21ca748c in kpuenvcr () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #33 0x21ce78c8 in OCIEnvNlsCreate () from /opt/abilisoft.com/thirdparty/cxoracle/lib/libclntsh.a(shr.o) #34 0xdd1219e8 in Environment_NewFromScratch (threaded=550875116, events=552651552) at Environment.c:120 #35 0xdd122168 in Connection_Init (self=0x20c7ec80, args=0x20f0cb20, keywordArgs=0x8) at Connection.c:50 #36 0x10015c64 in type_call (type=0x22f42bf8, args=0x20ca5eac, kwds=0x0) at ../Objects/typeobject.c:436 #37 0x1006ed3c in PyObject_Call (func=0x20d5afec, arg=0x20f0cb20, kw=0x8) at ../Objects/abstract.c:1861 [more python stuff] Any hints would be appreciated. Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org |
From: rwe <rog...@to...> - 2009-12-06 08:48:14
|
I have now changed the database column from a LONG to a CLOB but I still get the cx_Oracle.DatabaseError: ORA-01461: can bind a LONG value only for insert into a LONG column error, even though its a CLOB column. Very strange... I tried putting a cursor.setinputsizes(p_value=cx_Oracle.CLOB) immediately before the execute, but that made no difference... Note that the inserts and selects still work OK... Any ideas? Roger Anthony Tuininga schrieb: > On Fri, Nov 27, 2009 at 1:59 AM, rwe <rog...@to...> wrote: > >> Sorry to be a pest, but I am still having problems with longs... >> >> Important! this problem has started to occur since Oracle 11, specifically: >> Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit >> Production >> No change has been made to the cx_Oracle version... >> >> Updating a LONG column gives an oracle error (reads and writes are OK): >> cx_Oracle.DatabaseError: ORA-01461: can bind a LONG value only for >> insert into a LONG column >> >> The code looks like this: >> update_sql = """ >> UPDATE configs >> SET value=:p_value, last=:p_last, mtime=:p_mtime, muser=USER, >> remark=:p_remark >> WHERE id=(SELECT MAX(id) FROM configs WHERE dev_id=:p_dev_id) >> """ >> curs.setinputsizes(p_value = cx_Oracle.LONG_STRING) # This line makes >> no difference.... >> curs.execute(update_sql, p_value=test_data, >> p_last=now, >> p_dev_id=dev_id, >> p_mtime=now, >> p_remark="Small test program update") >> conn.commit() >> >> Maybe I have missed soemthing ? >> >> I am going to replace all LONG columns in the database with CLOB's before we >> go into production with 11g, as LONG's are deprecated, but it would be nice >> to have a fix or workaround for the meantime. >> > > Not sure if you are missing something or not. I am using Oracle 11g > but I avoid longs like the plague. :-) If you can send your create > table statement for the table in question above I'll try your code > myself and let you know if I have the same issues. If I do, I'll find > a workaround for you if possible. > > Anthony > > > |
From: Anthony T. <ant...@gm...> - 2009-12-02 15:12:01
|
On Wed, Dec 2, 2009 at 7:20 AM, Stefan Scriba <sc...@gm...> wrote: > > Hi > > I am now trying to connect to the Oracle database on a server somewhere in > our company LAN. In Oracle SQL Developer, I would typically use connection > parameters in the following form: > IP: 10.123.123.123 > Port: 1521 > SID: some > Connection name: BLAH > Username: user > Password: pass > > I tried to connect using the following Python statement (and various other > combinations that I came up with from the various examples in the docs and > on the web): > orcl = > cx_Oracle.connect("user","pass","BLAH@10.123.123.123:1521",cx_Oracle.SYSDBA) Looks like you are trying to use Oracle easy connect? Here's a link to a page that gives some background on this. Google for "oracle easy connect" and its the first hit. The format looks different from what you are doing above. I don't personally use Oracle easy connect but have an LDAP server which registers the names so they are easier to change when you need to move machines, rename databases, etc. http://it.toolbox.com/blogs/oracle-guide/forget-about-tns-connect-to-oracle-using-easy-connect-7295 > Advice? I am always interested to know where the authoritative documentation > is located, where I could have found this myself. So please also point me in > that direction, so I can possibly help myself in future. I have no idea where the authoritative documentation is located except here. http://www.oracle.com/technology/documentation/index.html You'll be there for several years though if you want to read it all. I generally use Google. :-) Anthony |
From: Stefan S. <sc...@gm...> - 2009-12-02 14:20:49
|
Hi I am now trying to connect to the Oracle database on a server somewhere in our company LAN. In Oracle SQL Developer, I would typically use connection parameters in the following form: IP: 10.123.123.123 Port: 1521 SID: some Connection name: BLAH Username: user Password: pass I tried to connect using the following Python statement (and various other combinations that I came up with from the various examples in the docs and on the web): orcl = cx_Oracle.connect("user","pass","BLAH@10.123.123.123:1521 ",cx_Oracle.SYSDBA) Advice? I am always interested to know where the authoritative documentation is located, where I could have found this myself. So please also point me in that direction, so I can possibly help myself in future. Regards Stefan |
From: Anthony T. <ant...@gm...> - 2009-12-01 21:52:17
|
On Tue, Dec 1, 2009 at 1:27 PM, Stefan Scriba <sc...@gm...> wrote: > Hi > > To David, Jim and Anthony - wooohooo, it's working! No more DLL complaints. > Thanks for the help! You're welcome. > > So, the problem was definitely me not setting the TNS_ADMIN variable to the > correct directory. In which documentation would I have found the TNS_ADMIN > mentioned, had I not short-circuited the problem and asked this mailing > list? You would have to search the Oracle documentation or ask on an Oracle mailing list since this is "basic" stuff for Oracle and not specific to Python. I put "basic" in quotes because its necessary to even get things up and running but its not even remotely obvious. There is a FAQ entry for it here: http://www.oracle.com/technology/tech/oci/instantclient/ic-faq.html#A4428 > Yet another brilliant example of how the open source community kicks ass. :-) Anthony |
From: Stefan S. <sc...@gm...> - 2009-12-01 20:28:08
|
Hi To David, Jim and Anthony - wooohooo, it's working! No more DLL complaints. Thanks for the help! So, the problem was definitely me not setting the TNS_ADMIN variable to the correct directory. In which documentation would I have found the TNS_ADMIN mentioned, had I not short-circuited the problem and asked this mailing list? Yet another brilliant example of how the open source community kicks ass. Stefan From: "Fawcett, David (MPCA)" <Dav...@st...> > Subject: Re: [cx-oracle-users] Oracle instant client > Stefan, > I am using cx_Oracle on XP with Python 2.5 and Oracle's instantclient. > I am guessing that you either didn't install them correctly, or you need to > add the instantclient folder to your path environment variable. > David. > > From: "Jim St.Cyr" <jim...@gm...> > Subject: Re: [cx-oracle-users] Oracle instant client > Stefan- > You need to add the directory to your path and set TNS_ADMIN to the same > path. > Jim > > > From: Anthony Tuininga <ant...@gm...> > Subject: Re: [cx-oracle-users] Oracle instant client > Hi, > You can definitely use the instant client with cx_Oracle and it is > fairly straightforward to do so. > Modify your PATH environment variable to include the path in which the > files were extracted. This is by default something like > C:\Oracle\InstantClient11_1. > Set TNS_ADMIN environment variable to point to the location of > sqlnet.or and tnsnames.ora or you can use "easy naming" and avoid any > of that stuff. > My suggestion is to extract the SQL*Plus zip file as well and use that > to test your connection strings. If you can connect with SQL*Plus you > should be able to connect with the same connection string using > cx_Oracle. > Hope that helps. > Anthony > > |
From: Jani T. <re...@gm...> - 2009-12-01 17:57:02
|
There used to be instant client version..? At least I've used cx_Oracle with instantclient while ago. Have you tried to set ORACLE_HOME environment variable? It seems to resolve usually many problems. On 12/1/09, Stefan Scriba <sc...@gm...> wrote: > Hi > > I apologise if the following question has been asked a million times, but I > have not found an obvious answer to date: > > I am trying to use cx_Oracle for Python2.6.4 with Oracle 11 in Windows XP. I > was hoping that I may be able to just use the Oracle instant client > (instantclient-basic-win32-11.1.0.7.0), which basically just seems to > consist of a bunch of DLL files. I copied these into a subdirectory of the > Python2.6 main folder. I then updated the windows path to include this > subfolder and rebooted. The path is definitely now pointing correctly, but > when I import the cx_Oracle library it still complains that it cannot find > the correct DLL files. > > So: Do I need the full Oracle client installed on each client PC running the > Python code or does the MUCH smaller instant client suffice? > > Regards > Stefan > |
From: Anthony T. <ant...@gm...> - 2009-12-01 17:32:20
|
Hi, You can definitely use the instant client with cx_Oracle and it is fairly straightforward to do so. Modify your PATH environment variable to include the path in which the files were extracted. This is by default something like C:\Oracle\InstantClient11_1. Set TNS_ADMIN environment variable to point to the location of sqlnet.or and tnsnames.ora or you can use "easy naming" and avoid any of that stuff. My suggestion is to extract the SQL*Plus zip file as well and use that to test your connection strings. If you can connect with SQL*Plus you should be able to connect with the same connection string using cx_Oracle. Hope that helps. Anthony On Tue, Dec 1, 2009 at 8:34 AM, Stefan Scriba <sc...@gm...> wrote: > Hi > > I apologise if the following question has been asked a million times, but I > have not found an obvious answer to date: > > I am trying to use cx_Oracle for Python2.6.4 with Oracle 11 in Windows XP. I > was hoping that I may be able to just use the Oracle instant client > (instantclient-basic-win32-11.1.0.7.0), which basically just seems to > consist of a bunch of DLL files. I copied these into a subdirectory of the > Python2.6 main folder. I then updated the windows path to include this > subfolder and rebooted. The path is definitely now pointing correctly, but > when I import the cx_Oracle library it still complains that it cannot find > the correct DLL files. > > So: Do I need the full Oracle client installed on each client PC running the > Python code or does the MUCH smaller instant client suffice? > > Regards > Stefan > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Jim St.C. <jim...@gm...> - 2009-12-01 17:28:34
|
Stefan- You need to add the directory to your path and set TNS_ADMIN to the same path. Jim Fawcett, David (MPCA) wrote: > > Stefan, > > > > I am using cx_Oracle on XP with Python 2.5 and Oracle's instantclient. > > > > I am guessing that you either didn't install them correctly, or you > need to add the instantclient folder to your path environment variable. > > > > David. > > > > *From:* Stefan Scriba [mailto:sc...@gm...] > *Sent:* Tuesday, December 01, 2009 9:34 AM > *To:* cx-...@li... > *Subject:* [cx-oracle-users] Oracle instant client > > > > Hi > > I apologise if the following question has been asked a million times, > but I have not found an obvious answer to date: > > I am trying to use cx_Oracle for Python2.6.4 with Oracle 11 in Windows > XP. I was hoping that I may be able to just use the Oracle instant > client (instantclient-basic-win32-11.1.0.7.0), which basically just > seems to consist of a bunch of DLL files. I copied these into a > subdirectory of the Python2.6 main folder. I then updated the windows > path to include this subfolder and rebooted. The path is definitely > now pointing correctly, but when I import the cx_Oracle library it > still complains that it cannot find the correct DLL files. > > So: Do I need the full Oracle client installed on each client PC > running the Python code or does the MUCH smaller instant client suffice? > > Regards > Stefan > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Fawcett, D. (MPCA) <Dav...@st...> - 2009-12-01 15:47:02
|
Stefan, I am using cx_Oracle on XP with Python 2.5 and Oracle's instantclient. I am guessing that you either didn't install them correctly, or you need to add the instantclient folder to your path environment variable. David. From: Stefan Scriba [mailto:sc...@gm...] Sent: Tuesday, December 01, 2009 9:34 AM To: cx-...@li... Subject: [cx-oracle-users] Oracle instant client Hi I apologise if the following question has been asked a million times, but I have not found an obvious answer to date: I am trying to use cx_Oracle for Python2.6.4 with Oracle 11 in Windows XP. I was hoping that I may be able to just use the Oracle instant client (instantclient-basic-win32-11.1.0.7.0), which basically just seems to consist of a bunch of DLL files. I copied these into a subdirectory of the Python2.6 main folder. I then updated the windows path to include this subfolder and rebooted. The path is definitely now pointing correctly, but when I import the cx_Oracle library it still complains that it cannot find the correct DLL files. So: Do I need the full Oracle client installed on each client PC running the Python code or does the MUCH smaller instant client suffice? Regards Stefan |
From: Stefan S. <sc...@gm...> - 2009-12-01 15:34:42
|
Hi I apologise if the following question has been asked a million times, but I have not found an obvious answer to date: I am trying to use cx_Oracle for Python2.6.4 with Oracle 11 in Windows XP. I was hoping that I may be able to just use the Oracle instant client (instantclient-basic-win32-11.1.0.7.0), which basically just seems to consist of a bunch of DLL files. I copied these into a subdirectory of the Python2.6 main folder. I then updated the windows path to include this subfolder and rebooted. The path is definitely now pointing correctly, but when I import the cx_Oracle library it still complains that it cannot find the correct DLL files. So: Do I need the full Oracle client installed on each client PC running the Python code or does the MUCH smaller instant client suffice? Regards Stefan |
From: Anthony T. <ant...@gm...> - 2009-12-01 14:38:10
|
Hi, The first time you execute a statement, cx_Oracle will delay type assignment until the first non null (or last) value is assigned to that particular variable. The second time, however, the selected bind variables are retained. So, if you have data that will frequently differ in "type" (null is assumed to be string lacking any other data) then you should run cursor.setinputsizes() beforehand to specify what type the data is supposed to be. That will resolve your issue. Anthony On Tue, Dec 1, 2009 at 3:49 AM, Amaury Forgeot d'Arc <ama...@gm...> wrote: > Hello, > > A collegue found a case where executemany() can fail if executed several times. > Here is the simplest test case we could find: > > import cx_Oracle > cnx = cx_Oracle.connect("xxx") > cur = cnx.cursor() > cur.execute("create table sometable (n number)") >>>> data1 = [[None]] >>>> data2 = [[None], [2.2]] > stmt = "insert into sometable (n) values (:n)" > cur.executemany(stmt, data1) > cur.executemany(stmt, data2) > > This last statement raises: > TypeError: expecting string or buffer data > > The surprising thing is that if we remove the first "[None]" in data2, > no error occurs! > The workaround is to create a new cursor for each call to executemany, > but this prevent it from sharing the cursor and the parse phase of the > statement. > > -- > Amaury Forgeot d'Arc > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Amaury F. d'A. <ama...@gm...> - 2009-12-01 10:49:54
|
Hello, A collegue found a case where executemany() can fail if executed several times. Here is the simplest test case we could find: import cx_Oracle cnx = cx_Oracle.connect("xxx") cur = cnx.cursor() cur.execute("create table sometable (n number)") >>> data1 = [[None]] >>> data2 = [[None], [2.2]] stmt = "insert into sometable (n) values (:n)" cur.executemany(stmt, data1) cur.executemany(stmt, data2) This last statement raises: TypeError: expecting string or buffer data The surprising thing is that if we remove the first "[None]" in data2, no error occurs! The workaround is to create a new cursor for each call to executemany, but this prevent it from sharing the cursor and the parse phase of the statement. -- Amaury Forgeot d'Arc |
From: Kevin M. <mi...@gm...> - 2009-11-28 15:14:46
|
This is more of an annoyance than anything else, but It's kind of weird though. Everything seems to be working, but if I am using Eclipse then the only modules, methods, etc. that I see when accessing cx_Oracle is cx_Oracle.__bootstrap__(), cx_Oracle.__file__, and cx_Oracle.__name__ Everything executes as intended though. Does anyone happen to know what I need to make available in order for Eclipse to see the contents of cx_Oracle? I have the following entries in my environment.plist -- PLIST START -- <plist version="1.0"> <dict> <key>EDITOR</key> <string>vi</string> <key>PATH</key> <string>/opt/local/bin:/opt/local/sbin:/Users/kevin/Library/Scripts:/usr/local/oracle/instantclient_10_2:/Users/kevin/Library/JSVN/jsvn-cac-1.3.0.cac3::/usr/local/fv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/localapps/python-egg-scripts/2.5</string> <key>DYLD_LIBRARY_PATH</key> <string>/usr/local/oracle/instantclient_10_2</string> </dict> </plist> -- PLIST END -- Any help is greatly appreciated. Thanks! Kevin 43rd Law of Computing: Anything that can go wr fortune: Segmentation violation -- Core dumped |