[Zope-DB] DCOracle2 problem on Solaris 8

tenasakai@earthlink.net tenasakai@earthlink.net
Tue, 16 Jul 2002 17:25:50 -0700


Hello Fabiano,

Thanks for your suggestion.  I reinstalled Python 2.1.3 as well as Zope 2.5.1
(which in turn necessitated installing DCOracle2).  In short, I have:

       Python:    2.1.3
       Zope:      2.5.1
       DCOracle2: 1.1

But I see no change in the behavior of my python script.
Ie.,

   vixen: ~/develop/python/dcoracle2, 129 python
   Python 2.1.3 (#1, Jul 16 2002, 13:17:06)
   [GCC 3.0.3] on sunos5
   Type "copyright", "credits" or "license" for more information.
   >>> import dco2
   >>> db=dco2.connect('report','glblreport','glbl')
   >>> c = db.cursor()
   >>> c.execute("select * from scott.emp")
   Traceback (most recent call last):
     File "<stdin>", line 1, in ?
   TypeError: an integer is required
   >>>
   >>> ^D
   vixen: ~/develop/python/dcoracle2, 130

I'd appreciate it if you have different suggestion.

Tena Sakai


On 16 Jul 2002 14:34:51 -0300 Fabiano Weimar dos Santos <fabiano@x3ng.com.br>
wrote:

Hi

try to install Zope 2.5.1 version with Python 2.1.3. I dont know what is
the latest version of DCOracle, but i think that you are not using the
latest stable version (sorry if i'm wrong). The Python 2.2 will be used
only in Zope 3 (or some other version that doens't exist yet).

Ate +

Em Seg, 2002-07-15 ās 21:44, tenasakai@earthlink.net escreveu:
> I have a problem with DCOracle2.
> First preliminaries:
>       OS:         Solaris 8 (SunOS5.8) on SunFire 4800
>       hostname:   vixen
>       Python:           2.2.1
>       Zope:       2.5.0
>       DCOracle2:  1.1
> 
> Here's the particulars.  My comments have ## at the start of the line
> and what I typed to the shell and what it returned are indented.
> 
> ## this section shows that I can do what I want to do via sqlplus from
vixen.
>    vixen: ~, 1
>    vixen: ~, 1 unsetenv ORACLE_SID
>    vixen: ~, 2
>    vixen: ~, 2 setenv ORACLE_SID glbl
>    vixen: ~, 3
>    vixen: ~, 3 sqlplus report/glblreport@glbl
> 
>    SQL*Plus: Release 8.1.6.0.0 - Production on Mon Jul 15 17:03:22 2002
> 
>    (c) Copyright 1999 Oracle Corporation.  All rights reserved.
> 
> 
>    Connected to:
>    Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
>    With the Partitioning option
>    JServer Release 8.1.7.0.0 - Production
> 
>    SQL> select sample_id
>      2    from lims_sys.sample
>      3   where (sample_id > 121)
>      4     and (sample_id < 130);
> 
>     SAMPLE_ID
>    ----------
>           122
>           123
>           124
>           125
>           126
>           127
>           129
> 
>    7 rows selected.
> 
>    SQL>
>    SQL> exit
>    Disconnected from Oracle8i Enterprise Edition Release 8.1.7.0.0 -
> Production
>    With the Partitioning option
>    JServer Release 8.1.7.0.0 - Production
> 
> ## that looked good enough
> ## now I want to do the same thing from my python program
> 
>    vixen: ~, 4
>    vixen: ~, 4 mkdir python-test
>    vixen: ~, 5
>    vixen: ~, 5 cd python-test
>    vixen: ~/python-test, 6
>    vixen: ~/python-test, 6 cat - > t.py
>    #!/usr/local/bin/python
> 
>    import dco2 as DCOracle2
>    db = DCOracle2.connect('report', 'glblreport', 'glbl')
>    c = db.cursor()
> 
>    ^D
>    vixen: ~/python-test, 7
>    vixen: ~/python-test, 7 chmod 755 t.py
>    vixen: ~/python-test, 8
>    vixen: ~/python-test, 8 ls -l t.py
>    -rwxr-xr-x   1 tws      dr           122 Jul 15 17:07 t.py
> 
> ## here's the python code, version 0
> 
>    vixen: ~/python-test, 9
>    vixen: ~/python-test, 9 cat t.py
>    #!/usr/local/bin/python
> 
>    import dco2 as DCOracle2
>    db = DCOracle2.connect('report', 'glblreport', 'glbl')
>    c = db.cursor()
> 
>    vixen: ~/python-test, 10
>    vixen: ~/python-test, 10 t.py
> 
> ## no complaint, which is a good news.  now I am going to add one extra line

> 
>    vixen: ~/python-test, 11
>    vixen: ~/python-test, 11 cat - >> t.py
> 
>    c.execute ('select sample_id from lims_sys.sample where (sample_id > 121)

> and
> (sample_id < 130)')
>    ^D
>    vixen: ~/python-test, 12
>    vixen: ~/python-test, 12 cat t.py
>    #!/usr/local/bin/python
> 
>    import dco2 as DCOracle2
>    db = DCOracle2.connect('report', 'glblreport', 'glbl')
>    c = db.cursor()
> 
> 
>    c.execute ('select sample_id from lims_sys.sample where (sample_id > 121)

> and
> (sample_id < 130)')
> 
> ## let's run it!
> 
>    vixen: ~/python-test, 13
>    vixen: ~/python-test, 13 t.py
>    Traceback (most recent call last):
>      File "t.py", line 8, in ?
>        c.execute ('select sample_id from lims_sys.sample where (sample_id >
> 121)
> and (sample_id < 130)')
>    TypeError: an integer is required
> 
> ## whatever this means...
> ## I am going to run it interactively now
> 
>    vixen: ~/python-test, 14
>    vixen: ~/python-test, 14 python
>    Python 2.2.1 (#1, Jul 12 2002, 16:36:08)
>    [GCC 3.0.3] on sunos5
>    Type "help", "copyright", "credits" or "license" for more information.
>    >>> import dco2 as DCOracle2
>    >>> db = DCOracle2.connect('report', 'glblreport', 'glbl')
>    >>> c = db.cursor()
>    >>> c.execute ('select sample_id from lims_sys.sample')
>    Traceback (most recent call last):
>      File "<stdin>", line 1, in ?
>    TypeError: an integer is required
>    >>>
>    >>>
>    >>> ^D
>    vixen: ~/python-test, 15
> 
> I am out of idea at this point.  Would you please give me a pointer or
> explain what is going on?  I would appreciate it.
> 
> Thanks.
> 
> Tena Sakai
> 
> 
> 
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db
> 
-- 
Fabiano Weimar dos Santos (Xiru) <fabiano@x3ng.com.br>
X3ng Web Technology <http://www.x3ng.com.br>