DCOracle Problem

Dorothea Kuehn dekay at zedat.fu-berlin.de
Tue Oct 31 15:59:16 EST 2000


I've compiled and installed DCOracle (1.3.2), the DCOracle_test.py works
well. But if I test the program posted here some time ago, I get several
errors.
System is Solaris 2.8, Oracle 8.1.6, python 1.4 (I know, this is old, but
as far as I read the docs it should work)
PYTHONPATH ist set to <myhome>/DCOracle-1.3.2/DCOracle 
and I've copied the .so libraries from DCOracle-1.3.2/src to that
directory.

What I want to try (or something alike):
$ python
>>> import DCOracle
>>> db = DCOracle.Connect("uid/passwd at sid")
>>> cursor = db.cursor()
>>> cursor.execute("select distinct owner from sys.all_tables")
>>> results = cursor.fetchall()
>>> cursor.close()
>>> db.close()
>>> print results
[('SYS',), ('SYSTEM',)]
>>> ^d

what I get:
>>> import DCOracle
Traceback (innermost last):
  File "<stdin>", line 1, in ?
ImportError: No module named DCOracle

Am I missing some path specification or what? (Sorry, I'm a total python
newbie.) What do I have to do if I want to include DCOracle?

this goes a bit further, but fails also:

>>> import oci_
>>> db = oci_.Connect("uid/passwd at sid")
>>> cursor = db.cursor()
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: attribute-less object

Help please. Whats going wrong here?





More information about the Python-list mailing list