DCOracle Problem

Bill Scherer Bill.Scherer at VerizonWireless.com
Wed Nov 1 07:08:50 EST 2000


Try setting your PYTHONPATH to "~/DCOracle-1.3.2/" instead of
"~/DCOracle-1.3.2/DCOracle"

- Bill

Dorothea Kuehn wrote:
> 
> 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?
> 
> --
> http://www.python.org/mailman/listinfo/python-list

-- 
William K. Scherer
Sr. Member of Applications Staff - Verizon Wireless
Bill.Scherer_at_VerizonWireless.com




More information about the Python-list mailing list