[Zope-DB] DCOracle2 problem on Solaris 8

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


--=-9nko2C9gdVfqxz4jYkN8
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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 =E0s 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
>=20
> 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.
>=20
> ## this section shows that I can do what I want to do via sqlplus from vi=
xen.
>    vixen: ~, 1
>    vixen: ~, 1 unsetenv ORACLE_SID
>    vixen: ~, 2
>    vixen: ~, 2 setenv ORACLE_SID glbl
>    vixen: ~, 3
>    vixen: ~, 3 sqlplus report/glblreport@glbl
>=20
>    SQL*Plus: Release 8.1.6.0.0 - Production on Mon Jul 15 17:03:22 2002
>=20
>    (c) Copyright 1999 Oracle Corporation.  All rights reserved.
>=20
>=20
>    Connected to:
>    Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
>    With the Partitioning option
>    JServer Release 8.1.7.0.0 - Production
>=20
>    SQL> select sample_id
>      2    from lims_sys.sample
>      3   where (sample_id > 121)
>      4     and (sample_id < 130);
>=20
>     SAMPLE_ID
>    ----------
>           122
>           123
>           124
>           125
>           126
>           127
>           129
>=20
>    7 rows selected.
>=20
>    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
>=20
> ## that looked good enough
> ## now I want to do the same thing from my python program
>=20
>    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
>=20
>    import dco2 as DCOracle2
>    db =3D DCOracle2.connect('report', 'glblreport', 'glbl')
>    c =3D db.cursor()
>=20
>    ^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
>=20
> ## here's the python code, version 0
>=20
>    vixen: ~/python-test, 9
>    vixen: ~/python-test, 9 cat t.py
>    #!/usr/local/bin/python
>=20
>    import dco2 as DCOracle2
>    db =3D DCOracle2.connect('report', 'glblreport', 'glbl')
>    c =3D db.cursor()
>=20
>    vixen: ~/python-test, 10
>    vixen: ~/python-test, 10 t.py
>=20
> ## no complaint, which is a good news.  now I am going to add one extra l=
ine
>=20
>    vixen: ~/python-test, 11
>    vixen: ~/python-test, 11 cat - >> t.py
>=20
>    c.execute ('select sample_id from lims_sys.sample where (sample_id > 1=
21)
> and
> (sample_id < 130)')
>    ^D
>    vixen: ~/python-test, 12
>    vixen: ~/python-test, 12 cat t.py
>    #!/usr/local/bin/python
>=20
>    import dco2 as DCOracle2
>    db =3D DCOracle2.connect('report', 'glblreport', 'glbl')
>    c =3D db.cursor()
>=20
>=20
>    c.execute ('select sample_id from lims_sys.sample where (sample_id > 1=
21)
> and
> (sample_id < 130)')
>=20
> ## let's run it!
>=20
>    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
>=20
> ## whatever this means...
> ## I am going to run it interactively now
>=20
>    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 =3D DCOracle2.connect('report', 'glblreport', 'glbl')
>    >>> c =3D 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
>=20
> 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.
>=20
> Thanks.
>=20
> Tena Sakai
>=20
>=20
>=20
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db
>=20
--=20
Fabiano Weimar dos Santos (Xiru) <fabiano@x3ng.com.br>
X3ng Web Technology <http://www.x3ng.com.br>

--=-9nko2C9gdVfqxz4jYkN8
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Para mais informações veja http://www.gnupg.org

iD8DBQA9NFk7TqbDpNXhEbERAgbNAJ9rp1+ZObsUkTBjP0k8SKWKRrngfQCg4otG
22y/zGAfu/rvrhTcjtwQ7kM=
=5HKp
-----END PGP SIGNATURE-----

--=-9nko2C9gdVfqxz4jYkN8--