cx-oracle-users Mailing List for cx_Oracle (Page 56)
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: Tobias S. <tob...@ca...> - 2010-05-11 07:33:32
|
Hi! I am trying to use an object of type cx_Oracle.OBJECT as query argument, but I am receiving an error message. Is it not supported by cx_Oracle, or am I doing something wrong? My code looks like this: >>> curs = conn.cursor() >>> curs.execute("select sdo_geometry('POINT(0 0)', 4326) from dual") <__builtin__.OracleCursor on <cx_Oracle.Connection to system@ (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.101.131)(PORT=11432)))(CONNECT_DATA=(SID=gis)))>> >>> obj = curs.fetchone()[0] >>> obj <cx_Oracle.OBJECT object at 0x8c9c320> >>> curs2 = conn.cursor() >>> curs2.execute("select sdo_util.to_wktgeometry(:arg) from dual", arg=obj) Traceback (most recent call last): File "<stdin>", line 1, in <module> cx_Oracle.NotSupportedError: Variable_TypeByValue(): unhandled data type cx_Oracle.OBJECT Thanks, Tobias |
From: Anthony T. <ant...@gm...> - 2010-05-10 15:31:26
|
Hmm, just a question: why would you want to write more than 2 GB at a time? Why not write it in chunks smaller than 2 GB? Can you see if that workaround works for you? I'm not really in a position (limited machines) to test such a large amount of data at one time -- so can't really say if the limitation is in the cx_Oracle code, the Oracle code or your code. Anthony On Mon, May 10, 2010 at 9:14 AM, VJ Kumar <vj...@gm...> wrote: > It seems that writing BLObs > 2GB is not possible. The code below: > > import cx_Oracle > from struct import * > from ctypes import create_string_buffer,sizeof > > time_key=201003110000 > l=1 > > cdm_conn = cx_Oracle.connect('...') > cdm_cur = cdm_conn.cursor() > > buf = create_string_buffer(2684770500) #2684770500 > sql=""" > insert into TMP( > l, > dimension_name_1, > dimension_name_2, > time_key, > blob > ) > values( > """+str(l)+""", > 'a', > 'b', > """+str(time_key)+""", > empty_blob() > ) > returning blob into :1""" > > blob_var = cdm_cur.var(cx_Oracle.BLOB) > cdm_cur.execute(sql, (blob_var,) ) > # > blob_var.getvalue().write(buf.raw) > > --------- > > causes this error: > > cx_Oracle.DatabaseError: ORA-22993: specified input amount is greater than > actual source amount > > If the buffer length < 2GB, it runs correctly. > > VJ > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: VJ K. <vj...@gm...> - 2010-05-10 15:20:25
|
It seems that writing BLObs > 2GB is not possible. The code below: import cx_Oracle from struct import * from ctypes import create_string_buffer,sizeof time_key=201003110000 l=1 cdm_conn = cx_Oracle.connect('...') cdm_cur = cdm_conn.cursor() buf = create_string_buffer(2684770500) #2684770500 sql=""" insert into TMP( l, dimension_name_1, dimension_name_2, time_key, blob ) values( """+str(l)+""", 'a', 'b', """+str(time_key)+""", empty_blob() ) returning blob into :1""" blob_var = cdm_cur.var(cx_Oracle.BLOB) cdm_cur.execute(sql, (blob_var,) ) # blob_var.getvalue().write(buf.raw) --------- causes this error: cx_Oracle.DatabaseError: ORA-22993: specified input amount is greater than actual source amount If the buffer length < 2GB, it runs correctly. VJ |
From: Piotr S. <sob...@gm...> - 2010-05-05 07:35:05
|
Thank for help :) Best Regards Peter W dniu 2010-05-03 15:38, Anthony Tuininga pisze: > Hi, those warnings are not important and are due to the way that > Oracle wrote its include files. You can safely ignore them -- or you > can go to the lines in those files and fix the problem if you want to > eliminate the warnings. :-) > > Anthony > > On Sun, May 2, 2010 at 3:53 PM, Piotr Sobota<sob...@gm...> wrote: > >> I have a problem with building cx_Oracle (5.0 and 5.0.3) on Ubuntu 9.04. >> >> When I run python setup.py build I get warnings: >> >> root@sq2wkj-desktop:~/cx_Oracle-5.0.3# python setup.py build >> running build >> running build_ext >> building 'cx_Oracle' extension >> creating build/temp.linux-i686-2.6-11g >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall >> -Wstrict-prototypes -fPIC -I/opt/oracle/instantclient/include >> -I/usr/include/python2.6 -c cx_Oracle.c -o >> build/temp.linux-i686-2.6-11g/cx_Oracle.o -DBUILD_VERSION=5.0.3 >> In file included from /opt/oracle/instantclient/include/oci.h:3024, >> from cx_Oracle.c:10: >> /opt/oracle/instantclient/include/ociap.h:10788: warning: function >> declaration isn't a prototype >> /opt/oracle/instantclient/include/ociap.h:10794: warning: function >> declaration isn't a prototype >> creating build/lib.linux-i686-2.6-11g >> gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions >> build/temp.linux-i686-2.6-11g/cx_Oracle.o -L/opt/oracle/instantclient/lib >> -L/opt/oracle/instantclient -lclntsh -o >> build/lib.linux-i686-2.6-11g/cx_Oracle.so >> >> >> >> >> I have installed instanclient oracle BASIC and instantclient oracle SDK. >> What I have to do to solve this warnings???? >> Thank for help. >> Sorry for my English :) >> Best Regards >> Peter >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> 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: Frédéric L. <fre...@gm...> - 2010-05-03 21:03:17
|
ok, sorry guys, it's magic, it works nows, so sorry ! a screenshot for information... don't known if the picture is allowed by mailman... thanks Anthony for your response regards On Mon, May 3, 2010 at 10:33 PM, Anthony Tuininga <ant...@gm...> wrote: > I don't have any problems. Perhaps you can try the links here? > > http://cx-oracle.sourceforge.net > > If you don't have problems there, let me know. If you still do, I'm > not sure what is going on at that point! > > Anthony > > 2010/5/3 Frédéric Laurent <fre...@gm...>: >> Hello >> >> I can not download cx_Oracle-5.0.3-11g.win32-py3.1.msi (even the 10g >> version). I tried several mirrors and each time the result is the same >> : >> 404 not found ! >> Does anybody else have troubles ? >> >> thanks in advance >> >> regards >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> 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: Anthony T. <ant...@gm...> - 2010-05-03 20:33:52
|
I don't have any problems. Perhaps you can try the links here? http://cx-oracle.sourceforge.net If you don't have problems there, let me know. If you still do, I'm not sure what is going on at that point! Anthony 2010/5/3 Frédéric Laurent <fre...@gm...>: > Hello > > I can not download cx_Oracle-5.0.3-11g.win32-py3.1.msi (even the 10g > version). I tried several mirrors and each time the result is the same > : > 404 not found ! > Does anybody else have troubles ? > > thanks in advance > > regards > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Frédéric L. <fre...@gm...> - 2010-05-03 19:58:52
|
Hello I can not download cx_Oracle-5.0.3-11g.win32-py3.1.msi (even the 10g version). I tried several mirrors and each time the result is the same : 404 not found ! Does anybody else have troubles ? thanks in advance regards |
From: Anthony T. <ant...@gm...> - 2010-05-03 13:38:32
|
Hi, those warnings are not important and are due to the way that Oracle wrote its include files. You can safely ignore them -- or you can go to the lines in those files and fix the problem if you want to eliminate the warnings. :-) Anthony On Sun, May 2, 2010 at 3:53 PM, Piotr Sobota <sob...@gm...> wrote: > I have a problem with building cx_Oracle (5.0 and 5.0.3) on Ubuntu 9.04. > > When I run python setup.py build I get warnings: > > root@sq2wkj-desktop:~/cx_Oracle-5.0.3# python setup.py build > running build > running build_ext > building 'cx_Oracle' extension > creating build/temp.linux-i686-2.6-11g > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -I/opt/oracle/instantclient/include > -I/usr/include/python2.6 -c cx_Oracle.c -o > build/temp.linux-i686-2.6-11g/cx_Oracle.o -DBUILD_VERSION=5.0.3 > In file included from /opt/oracle/instantclient/include/oci.h:3024, > from cx_Oracle.c:10: > /opt/oracle/instantclient/include/ociap.h:10788: warning: function > declaration isn't a prototype > /opt/oracle/instantclient/include/ociap.h:10794: warning: function > declaration isn't a prototype > creating build/lib.linux-i686-2.6-11g > gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-i686-2.6-11g/cx_Oracle.o -L/opt/oracle/instantclient/lib > -L/opt/oracle/instantclient -lclntsh -o > build/lib.linux-i686-2.6-11g/cx_Oracle.so > > > > > I have installed instanclient oracle BASIC and instantclient oracle SDK. > What I have to do to solve this warnings???? > Thank for help. > Sorry for my English :) > Best Regards > Peter > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Piotr S. <sob...@gm...> - 2010-05-02 21:53:22
|
I have a problem with building cx_Oracle (5.0 and 5.0.3) on Ubuntu 9.04. When I run python setup.py build I get warnings: root@sq2wkj-desktop:~/cx_Oracle-5.0.3# python setup.py build running build running build_ext building 'cx_Oracle' extension creating build/temp.linux-i686-2.6-11g gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/opt/oracle/instantclient/include -I/usr/include/python2.6 -c cx_Oracle.c -o build/temp.linux-i686-2.6-11g/cx_Oracle.o -DBUILD_VERSION=5.0.3 In file included from /opt/oracle/instantclient/include/oci.h:3024, from cx_Oracle.c:10: /opt/oracle/instantclient/include/ociap.h:10788: warning: function declaration isn't a prototype /opt/oracle/instantclient/include/ociap.h:10794: warning: function declaration isn't a prototype creating build/lib.linux-i686-2.6-11g gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-i686-2.6-11g/cx_Oracle.o -L/opt/oracle/instantclient/lib -L/opt/oracle/instantclient -lclntsh -o build/lib.linux-i686-2.6-11g/cx_Oracle.so I have installed instanclient oracle BASIC and instantclient oracle SDK. What I have to do to solve this warnings???? Thank for help. Sorry for my English :) Best Regards Peter |
From: Eric P. <er...@ac...> - 2010-04-27 22:10:25
|
More info: * XCode 2.5 These are the error messages from the run: $ gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -bundle -undefined dynamic_lookup -arch i386 build/temp.macosx-10.4-fat-2.6-10g/cx_Oracle.o -L/Users/.../instantclient_10_2/lib -L/Users/.../instantclient_10_2 -lclntsh -o build/lib.macosx-10.4-fat-2.6-10g/cx_Oracle.so /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: /Users/.../instantclient_10_2/lib/libclntsh.dylib load command 7 unknown cmd field collect2: ld returned 1 exit status I saw another post pointing to upgrading XCode. I'd like to hold off on that, as this is a shared build machine. I'll try building the lib on my own Mac later on, and see how that goes. - Eric On 4/27/2010 1:39 PM, Eric Promislow wrote: > Here's my setup: > > * Intel box > * OSX 10.4.11 (deliberately; we're supporting users back to 10.4) > * ActivePython 2.6 > * Oracle Instant Client 10.2 (basic + sdk) > * gcc 4.0.1 (build 5370) > * cx_Oracle 5.0.3 > > When I run `python setup.py build` I get the usual warnings > complaining about ppc, and then the build stops with this > error message: > > lipo: can't open input file: /var/tmp//ccERwSTc.out (No such > file or directory) > > Yes, there is a "//" in the error message, /var/tmp has open > permissions, and the file doesn't exist, at least by the > time I checked. > > Google found nothing. Anyone have any suggestions? > > Thanks, > Eric > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Eric P. <er...@ac...> - 2010-04-27 20:40:15
|
Here's my setup: * Intel box * OSX 10.4.11 (deliberately; we're supporting users back to 10.4) * ActivePython 2.6 * Oracle Instant Client 10.2 (basic + sdk) * gcc 4.0.1 (build 5370) * cx_Oracle 5.0.3 When I run `python setup.py build` I get the usual warnings complaining about ppc, and then the build stops with this error message: lipo: can't open input file: /var/tmp//ccERwSTc.out (No such file or directory) Yes, there is a "//" in the error message, /var/tmp has open permissions, and the file doesn't exist, at least by the time I checked. Google found nothing. Anyone have any suggestions? Thanks, Eric |
From: Weber, G. <Geo...@PA...> - 2010-04-15 18:03:19
|
I have pretty much copied http://www.oracle.com/technology/pub/articles/tuininga-cx_oracle.html, listing 7 (at bottom of page) as a test. I'm running Python 3.1.2, cx_Oracle 5.03, Oracle 11G R1 server and Oracle 10G R2 client (I have to connect to several legacy databases on 8i and 9i as well). When I run the code, I do get a DCN notification back, but am unable to do anything with it. Below is the only output I'm getting, and it's 2 lines per database change made to my test table: $ python3 cx_oracle_database_change_notification.py UnicodeDecodeError: 'utf16' codec can't decode bytes in position 8-8: truncated data UnicodeDecodeError: 'utf16' codec can't decode bytes in position 8-8: truncated data I've changed the first line of the 'OnChanges' function to print the repr of the "message" parameter that's passed in, and also tried to use 'pdb' to set a breakpoint at the function entrance and at the print('{0}.format(repr(message) ) ) line I just described without seeing the breakpoint "work". That led me to believe that the problem was on the Oracle client/cx_Oracle side. So... I started setting the NLS_LANG environment variable to 'American_America.UTF8' as described at this link: http://www.dbapool.com/forumthread/topic_6463.html , which closely matches the official Oracle documentation. I did it both as an "export" at the shell level before invoking the script and inside the script itself via os.environ['NLS_LANG']. However, nothing changes the 2-line output sequence I receive per DCN message. Is there something obvious I'm missing or is there something I can do to fix the issue and actually get a valid message that I can parse? I can post the full src code here if necessary. Thanks! Geoff Weber geo...@pa... |
From: Floris B. <flo...@gm...> - 2010-04-14 15:53:44
|
Hi The attached patch is what I use to make cx_Oracle work on AIX. This has been tested on AIX 5.2 and 5.3 with Oracle Instant Client 10g & 11g. Note that the instant client for version 9 is no longer available so I haven't added support for that as I can't test it. The only ugly part is that I needed to remove ping aka Connection_Ping method for 10g. For some unknow reason the .OCIPing symbol is not provided in libclntsh 10g on AIX. Hopefully this is useful. Let me know if there are problems with this patch I need to address. Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org |
From: pablo p. <pab...@gm...> - 2010-04-12 21:04:12
|
Hi, I've installed oracle xe database and client on oracle enterprise linux 5. I 've installed cx_Oracle with: export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/ export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:$PATH sudo -E easy_install cx_Oracle I can use the django dev server with: export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/ export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:$PATH python manage.py runserver When I'm trying to use Apache with mod_wsgi I'm getting: ImproperlyConfigured: Error loading cx_Oracle module: libclntsh.so.10.1: cannot open shared object file: No such file or directory I'm getting this error because the environment variables are not set for the Apache user. How do I set them? I've tried searching the web but the solution didn't work for me. When using the 11g server (not xe) do I need to install anything else in order to install cx_Oracle with easy_install? If I need some client, will this be enough http://www.oracle.com/technology/software/products/sql/index.html ? If not, what client do I need to install? Thanks |
From: Rob D. <Rob...@5o...> - 2010-03-26 17:42:40
|
Hi If anyone could help OS - CentOS release 5.4 (Final) OS Version Type - (64Bit) Cx_Oracle Version - CentOS 5 x86_64 RPM (Oracle 10g, Python 2.4) Python - Python 2.4.3 (#1, Sep 3 2009, 15:37:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Oracle Version - 10.2.0.1 Run the following SQL statements CREATE TABLE DEV_ROB_BUG_TEST2 (ID NUMBER); INSERT INTO DEV_ROB_BUG_TEST2 VALUES (-1); COMMIT; If I run the following on the command interpreter >>> >>> >>> >>> import cx_Oracle >>> >>> dicOracleInfo = {} >>> dicOracleInfo["U"]=u"XXX" >>> dicOracleInfo["P"]=u"XXX" >>> dicOracleInfo["IP"]=u"XXX" >>> dicOracleInfo["Port"]=u"1521" >>> dicOracleInfo["SID"]=u"XXX" >>> dicOracleInfo["Trace"]=u"FALSE" >>> dicOracleInfo["Arraysize"]=10000 >>> >>> strTest1=u"SELECT * FROM DEV_ROB_BUG_TEST2" >>> >>> oraclecon = cx_Oracle.connect(dicOracleInfo["U"],dicOracleInfo["P"],cx_Oracle.makedsn(dicOracleInfo["IP"],int(dicOracleInfo["Port"]),dicOracleInfo["SID"])) >>> oraclecur1 = oraclecon.cursor() >>> oraclecur2 = oraclecon.cursor() >>> >>> oraclecur2.arraysize = int(dicOracleInfo["Arraysize"]) >>> >>> print strTest1 SELECT * FROM DEV_ROB_BUG_TEST2 >>> type(strTest1) <type 'unicode'> >>> >>> oraclecur2.execute(strTest1) <__builtin__.OracleCursor on <cx_Oracle.Connection to XXX@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= XXX")(PORT=1521)))(CONNECT_DATA=(SID= XXX")))>> >>> >>> lstRows = oraclecur2.fetchall() >>> >>> print lstRows [(-1,)] I get the correct result. If I put the commands in a script I get the following error -bash-3.2$ python test2.py SELECT * FROM DEV_ROB_BUG_TEST2 Traceback (most recent call last): File "test2.py", line 25, in ? lstRows = oraclecur2.fetchall() cx_Oracle.DatabaseError: OCI-22061: invalid format text [T -bash-3.2$ The problem seems to be related to number types. If I use a VARHCAR2(50) there are no issues. Thanks Rob |
From: Mark H. <mh...@pi...> - 2010-03-25 17:49:51
|
The other day I finally got so fed up with sqlplus and its dumb table formatting I wrote a mini-version that does pretty much the same thing, except: - nice table formatting - command line editing - table completion for tables, columns - login aliases It's easy to install, just download a single file. I've stuck the preliminary release here: http://markharrison.net/orapig/ If you're interested in trying it out, can you give it a go and let me know if it works for you? thanks, Mark """ sqlminus -- sqlplus minus. the features? the suck? you be the judge! usage: sqlminus connstr - interactive shell sqlminus connstr cmds... - execute cmds sqlminus connstr @file - execute cmd in file.sql configuration file: ~/.sqlminus holds connect string aliases. format: foo = 'foo/bar@baz' special commands: tables - show user tabes desc - describe a table rehash - refresh user table information mono - set monochrome output color - set color output features: readline editing semi-intelligent tab completion for tables, columns nice table formatting single file, easy to install author: Mark Harrison, mh...@pi... license and download: bsd-ish. see orapig package for complete text. sqlminus is part of the orapig package: http://code.google.com/p/orapig http://markharrison.net/orapig """ |
From: Anthony T. <ant...@gm...> - 2010-03-19 14:56:15
|
>From your list of environment variables, these are the ones that are relevant and should be the same when running within the web server. Check to see if they are there and what values they have carefully! - This one sets the encoding used by Oracle; without it it will guess one on its own NLS_LANG=AMERICAN_AMERICA.AL32UTF8 - This one defines where to search for libraries; as stated elsewhere you can also set this in /etc/ld.so.conf which will make it unnecessary to set this variable and is probably preferable LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: - This one sets the location where Oracle searches for configuration files like sqlnet.ora and tnsnames.ora; if you don't set this it looks in its own location defined differently for each platform but often it is $ORACLE_HOME/network/admin TNS_ADMIN=/var/lib/hudson - This one is required and tells Oracle where to find message files and everything else ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client Hopefully this helps. Anthony On Fri, Mar 19, 2010 at 8:23 AM, Jason Baker <jb...@ze...> wrote: > On Thu, Mar 18, 2010 at 11:52 PM, juhui <ph...@gm...> wrote: >> >> sorry, I said in django prjects. >> I have encounter this Traceback several dasys before . >> may be the Python script can't get the environment var ORACLE_HOME >> add the two lines to your scripts ,the value depends on you environment . > > I believe the ORACLE_HOME variable is set properly. I'm unable to reproduce > the issue when I log in to the server under the same user. So I think it's > some kind of environment variable issue. However, I don't seem to be able > to figure out what it is. For reference, here are the environment variables > when I log in to the server myself: > > HOSTNAME=inftest01 > TERM=xterm > SHELL=/bin/bash > HISTSIZE=1000 > KDE_NO_IPV6=1 > NLS_LANG=AMERICAN_AMERICA.AL32UTF8 > USER=hudson > LS_COLORS=no=00:fi=00:di=00 > LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: > KDEDIR=/usr > PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin:/var/lib/hudson/usr/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin > MAIL=/var/spool/mail/hudson > TNS_ADMIN=/var/lib/hudson > PWD=/var/lib/hudson > INPUTRC=/etc/inputrc > KDE_IS_PRELINKED=1 > LANG=en_US.UTF-8 > PS1=\W > SQLPATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/sqlplus > SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass > HOME=/var/lib/hudson > SHLVL=3 > LOGNAME=hudson > LESSOPEN=|/usr/bin/lesspipe.sh %s > ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client > G_BROKEN_FILENAMES=1 > _=/bin/env > > ...I don't see anything there that should cause a problem. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Jason B. <jb...@ze...> - 2010-03-19 14:23:16
|
On Thu, Mar 18, 2010 at 11:52 PM, juhui <ph...@gm...> wrote: > sorry, I said in django prjects. > I have encounter this Traceback several dasys before . > may be the Python script can't get the environment var ORACLE_HOME > add the two lines to your scripts ,the value depends on you environment . > I believe the ORACLE_HOME variable is set properly. I'm unable to reproduce the issue when I log in to the server under the same user. So I think it's some kind of environment variable issue. However, I don't seem to be able to figure out what it is. For reference, here are the environment variables when I log in to the server myself: HOSTNAME=inftest01 TERM=xterm SHELL=/bin/bash HISTSIZE=1000 KDE_NO_IPV6=1 NLS_LANG=AMERICAN_AMERICA.AL32UTF8 USER=hudson LS_COLORS=no=00:fi=00:di=00 LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: KDEDIR=/usr PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin:/var/lib/hudson/usr/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin MAIL=/var/spool/mail/hudson TNS_ADMIN=/var/lib/hudson PWD=/var/lib/hudson INPUTRC=/etc/inputrc KDE_IS_PRELINKED=1 LANG=en_US.UTF-8 PS1=\W SQLPATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/sqlplus SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass HOME=/var/lib/hudson SHLVL=3 LOGNAME=hudson LESSOPEN=|/usr/bin/lesspipe.sh %s ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client G_BROKEN_FILENAMES=1 _=/bin/env ...I don't see anything there that should cause a problem. |
From: juhui <ph...@gm...> - 2010-03-19 04:52:08
|
sorry, I said in django prjects. I have encounter this Traceback several dasys before . may be the Python script can't get the environment var ORACLE_HOME add the two lines to your scripts ,the value depends on you environment . 2010/3/19 Jason Baker <jb...@ze...> > On Thu, Mar 18, 2010 at 11:10 AM, juhui <ph...@gm...> wrote: > >> try add >> -------------- >> import os >> os.environ["ORACLE_HOME"] = "/home/oracle/product/10.2.0" >> -------------- >> to setting.py header. >> > > I'm not sure I understand. First, that directory doesn't exist. Second, > which setting.py header are we talking about? > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > -- LB can FlY |
From: Jason B. <jb...@ze...> - 2010-03-18 17:45:27
|
On Thu, Mar 18, 2010 at 11:10 AM, juhui <ph...@gm...> wrote: > try add > -------------- > import os > os.environ["ORACLE_HOME"] = "/home/oracle/product/10.2.0" > -------------- > to setting.py header. > I'm not sure I understand. First, that directory doesn't exist. Second, which setting.py header are we talking about? |
From: juhui <ph...@gm...> - 2010-03-18 16:10:45
|
try add -------------- import os os.environ["ORACLE_HOME"] = "/home/oracle/product/10.2.0" -------------- to setting.py header. 2010/3/18 Jason Baker <jb...@ze...> > My continuous integration server is getting a weird error that I haven't > seen before: > > Traceback (most recent call last): > File > "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/multiprocessing-2.6.2.1-py2.6-linux-i686.egg/multiprocessing/process.py", > line 237, in _bootstrap > self.run() > File > "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/jiva_interface/process/__init__.py", > line 150, in run > self.main() > File > "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/jiva_interface/interface_core/row_loader.py", > line 239, in main > store = create_store(self.cfg, name=self.name) > File "build/bdist.linux-i686/egg/dbkit/connect.py", line 127, in > create_store > return _make_store(db_cfg, name, zstore_util) > File "build/bdist.linux-i686/egg/dbkit/connect.py", line 168, in > _make_store > store = zstore_util.create(name, uri) > File > "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/storm-0.16.0-py2.6-linux-i686.egg/storm/zope/zstorm.py", > line 133, in create > store = Store(database) > File > "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/storm-0.16.0-py2.6-linux-i686.egg/storm/store.py", > line 72, in __init__ > self._connection = database.connect(self._event) > File > "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/storm-0.16.0-py2.6-linux-i686.egg/storm/database.py", > line 381, in connect > return self.connection_factory(self, event) > File > "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/storm-0.16.0-py2.6-linux-i686.egg/storm/database.py", > line 182, in __init__ > self._raw_connection = self._database.raw_connect() > File "build/bdist.linux-i686/egg/storm_oracle/oracle.py", line 578, in > raw_connect > self._password, self._dsn) > InterfaceError: Unable to acquire Oracle environment handle > > I've done a basic google search, and found that this is usually a mismatch > of some kind between the ORACLE_HOME and LD_LIBRARY_PATH. That doesn't seem > to be the case right now. The variables that I have set are coming from > $ORACLE_HOME/bin/oracle_env.sh. I've tried it with both 5.0.2 and 5.0.3, > and I still get the same thing. Here are the environment variables I'm > using (with all the sensitive ones taken out): > > BUILD_URL=http://192.168.2.27:8080/job/jiva_interface_trunk/62/ > HOSTNAME=inftest01 > SHELL=/bin/bash > TERM=xterm > HISTSIZE=1000 > > NLS_LANG=AMERICAN_AMERICA.AL32UTF8 > KDE_NO_IPV6=1 > BUILD_TAG=hudson-jiva_interface_trunk-62 > JIVA_DB_PLATFORM=oracle > WORKSPACE=/var/lib/hudson/jobs/jiva_interface_trunk/workspace > JOB_URL=http://192.168.2.27:8080/job/jiva_interface_trunk/ > > USER=hudson > ORACLE_DSN_NAME=oradev > LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35: > > LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: > > NO_BULK=True > KDEDIR=/usr > NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat > PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin:/var/lib/hudson/usr/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin > > TNS_ADMIN=/var/lib/hudson > MAIL=/var/spool/mail/hudson > INPUTRC=/etc/inputrc > PWD=/var/lib/hudson/jobs/jiva_interface_trunk/workspace > HUDSON_URL=http://192.168.2.27:8080/ > > LANG=en_US.UTF-8 > KDE_IS_PRELINKED=1 > JOB_NAME=jiva_interface_trunk > XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt > BUILD_ID=2010-03-18_08-48-40 > SQLPATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/sqlplus > > SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass > HOME=/var/lib/hudson > SHLVL=2 > SRV_ROOT=/srv/www/lighttpd/ > EXECUTOR_NUMBER=0 > LOGNAME=hudson > HUDSON_HOME=/var/lib/hudson > LESSOPEN=|/usr/bin/lesspipe.sh %s > > BUILD_NUMBER=62 > HUDSON_COOKIE=25e5918c-dd84-4f59-b1f2-97104c386a0d > ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client > G_BROKEN_FILENAMES=1 > _=/bin/env > > Is there anything here that might cause a problem? > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > -- LB can FlY |
From: Jason B. <jb...@ze...> - 2010-03-18 14:30:24
|
My continuous integration server is getting a weird error that I haven't seen before: Traceback (most recent call last): File "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/multiprocessing-2.6.2.1-py2.6-linux-i686.egg/multiprocessing/process.py", line 237, in _bootstrap self.run() File "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/jiva_interface/process/__init__.py", line 150, in run self.main() File "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/jiva_interface/interface_core/row_loader.py", line 239, in main store = create_store(self.cfg, name=self.name) File "build/bdist.linux-i686/egg/dbkit/connect.py", line 127, in create_store return _make_store(db_cfg, name, zstore_util) File "build/bdist.linux-i686/egg/dbkit/connect.py", line 168, in _make_store store = zstore_util.create(name, uri) File "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/storm-0.16.0-py2.6-linux-i686.egg/storm/zope/zstorm.py", line 133, in create store = Store(database) File "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/storm-0.16.0-py2.6-linux-i686.egg/storm/store.py", line 72, in __init__ self._connection = database.connect(self._event) File "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/storm-0.16.0-py2.6-linux-i686.egg/storm/database.py", line 381, in connect return self.connection_factory(self, event) File "/var/lib/hudson/jobs/jiva_interface_trunk/workspace/lib/python2.6/site-packages/storm-0.16.0-py2.6-linux-i686.egg/storm/database.py", line 182, in __init__ self._raw_connection = self._database.raw_connect() File "build/bdist.linux-i686/egg/storm_oracle/oracle.py", line 578, in raw_connect self._password, self._dsn) InterfaceError: Unable to acquire Oracle environment handle I've done a basic google search, and found that this is usually a mismatch of some kind between the ORACLE_HOME and LD_LIBRARY_PATH. That doesn't seem to be the case right now. The variables that I have set are coming from $ORACLE_HOME/bin/oracle_env.sh. I've tried it with both 5.0.2 and 5.0.3, and I still get the same thing. Here are the environment variables I'm using (with all the sensitive ones taken out): BUILD_URL=http://192.168.2.27:8080/job/jiva_interface_trunk/62/ HOSTNAME=inftest01 SHELL=/bin/bash TERM=xterm HISTSIZE=1000 NLS_LANG=AMERICAN_AMERICA.AL32UTF8 KDE_NO_IPV6=1 BUILD_TAG=hudson-jiva_interface_trunk-62 JIVA_DB_PLATFORM=oracle WORKSPACE=/var/lib/hudson/jobs/jiva_interface_trunk/workspace JOB_URL=http://192.168.2.27:8080/job/jiva_interface_trunk/ USER=hudson ORACLE_DSN_NAME=oradev LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35: LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: NO_BULK=True KDEDIR=/usr NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin:/var/lib/hudson/usr/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin TNS_ADMIN=/var/lib/hudson MAIL=/var/spool/mail/hudson INPUTRC=/etc/inputrc PWD=/var/lib/hudson/jobs/jiva_interface_trunk/workspace HUDSON_URL=http://192.168.2.27:8080/ LANG=en_US.UTF-8 KDE_IS_PRELINKED=1 JOB_NAME=jiva_interface_trunk XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt BUILD_ID=2010-03-18_08-48-40 SQLPATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/sqlplus SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass HOME=/var/lib/hudson SHLVL=2 SRV_ROOT=/srv/www/lighttpd/ EXECUTOR_NUMBER=0 LOGNAME=hudson HUDSON_HOME=/var/lib/hudson LESSOPEN=|/usr/bin/lesspipe.sh %s BUILD_NUMBER=62 HUDSON_COOKIE=25e5918c-dd84-4f59-b1f2-97104c386a0d ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client G_BROKEN_FILENAMES=1 _=/bin/env Is there anything here that might cause a problem? |
From: Mark H. <mh...@pi...> - 2010-03-18 02:02:13
|
On 3/17/10 4:51 PM, Seth Friedman wrote: > I've been looking around finding different sets of instructions for > getting cx_Oracle installed on my Mac. I am hoping I don't need to do > something drastic like change OS or python versions, but I'm running out > of things to try. I have hit the same thing. In our case upgrading to OS 10.6 was an option so we did that and the problem went away, so I stopped investigating. > > My environment is OS 10.5.8. Python 2.6.2. I've tried different > variants of the oracle clients, 10, 11, instant client basic+sdk+sqlplus > (and sqlplus is working). > > Does anyone have any insight into what might be wrong? > > seths-macbook-pro:appschecker seth$ python -c 'import cx_Oracle' > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "build/bdist.macosx-10.3-fat/egg/cx_Oracle.py", line 7, in <module> > File "build/bdist.macosx-10.3-fat/egg/cx_Oracle.py", line 6, in > __bootstrap__ > ImportError: > dlopen(/Users/seth/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.3-fat.egg-tmp/cx_Oracle.so, > 2): Symbol not found: _OCIAttrGet > Referenced from: > /Users/seth/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.3-fat.egg-tmp/cx_Oracle.so > Expected in: dynamic lookup > > A hopeful thanks in advance, > ~seth > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: juhui <ph...@gm...> - 2010-03-18 01:10:45
|
Is the file that not found exists? is the lib path to this file in the lib path? the file and related directory permission correct? 2010/3/18 Seth Friedman <se...@be...> > I've been looking around finding different sets of instructions for getting > cx_Oracle installed on my Mac. I am hoping I don't need to do something > drastic like change OS or python versions, but I'm running out of things to > try. > > My environment is OS 10.5.8. Python 2.6.2. I've tried different > variants of the oracle clients, 10, 11, instant client basic+sdk+sqlplus > (and sqlplus is working). > > Does anyone have any insight into what might be wrong? > > seths-macbook-pro:appschecker seth$ python -c 'import cx_Oracle' > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "build/bdist.macosx-10.3-fat/egg/cx_Oracle.py", line 7, in <module> > File "build/bdist.macosx-10.3-fat/egg/cx_Oracle.py", line 6, in > __bootstrap__ > ImportError: > dlopen(/Users/seth/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.3-fat.egg-tmp/cx_Oracle.so, > 2): Symbol not found: _OCIAttrGet > Referenced from: > /Users/seth/.python-eggs/cx_Oracle-5.0.3-py2.6-macosx-10.3-fat.egg-tmp/cx_Oracle.so > Expected in: dynamic lookup > > A hopeful thanks in advance, > ~seth > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > -- LB can FlY |
the temporary solution is I added import os os.environ["ORACLE_HOME"] = "/home/oracle/product/10.2.0" to setting.py I will work on why the script can't get the environment var ORACLE_HOME Thanks you all 在 2010年3月18日 上午5:04,Anthony Tuininga <ant...@gm...>写道: > 2010/3/17 juhui <ph...@gm...>: > > thanks you all. > > I added the apache user to dba group. it doesn't work. > > I find the stupid xx set the directory permission to drwx------ 。。 > > after change the related dirs permission。 > > The error information changed! > > > > Unable to acquire Oracle environment handle > > > > is this issue cause by mismach cx_Oracle version and oracle client > version? > > Possibly. Or it could be that you haven't set your ORACLE_HOME > properly. Check all your environment variables as well as your > compatibility. > > Anthony > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- LB can FlY |