From: <sc...@at...> - 2008-02-14 09:24:25
|
LIM SIN-CHEE sc...@at... Jon, Thank you for your help. I have used the db2inst1 account to run it. It succeeds. But after several function testing, it fails. I am new to python. Do you have any idea what gets wrong with it? [db2inst1@pc181 test]$ python test_basic.py DB2.SQL_type_dict for description2 ... ok DB2.connect() - Successful ... ok DB2.connect() - Connection failure with wrong database ... ok DB2.connect() - Connection failure with wrong username ... ok DB2.connect() - Connection failure with wrong password ... ok db.cursor() - Successful ... ok cs.execute() - CREATE TABLE ... ok cs.execute() - INSERT (NORMAL) ... ok cs.execute() - INSERT (NULL) ... ok cs.execute() - INSERT (Wrong type) ... ok cs.execute() - INSERT (Right truncation) ... ok cs.execute() - INSERT (Wrong # of params) ... ok cs.fetchone() - SELECT (NORMAL) ... ok cs.fetchone() - SELECT (NULL) ... ok cs.fetchone() - fetch w/o SELECT ... ok cs.fetchone() - beyond the last result set ... ok cs.executemany() ... ok cs.fetchall() ... ok cs.fetchmany() ... ok cs.description & description2 ... ok cs.rowcount - w/ Non-scrollable cursor ... ok cs.callproc() - IN, OUT, INOUT parameters ... ok cs.callproc() - w/ Result set ... ok Create table in random manner (columns of random types) ... python: Modules/gcmo dule.c:231: visit_decref: Assertion `gc->gc.gc_refs != 0' failed. Aborted [db2inst1@pc181 test]$ LIM SIN-CHEE sc...@at... 寄件人: "Jon 收件人: sc...@at... 日期: 2008/02/14 上午 06:31 主旨: Re: [PyDB2-discuss] Import DB2 error on DB2 v9.1 I'm assuming it built successfully and that it fails on runtime. Is it possible that you're not running as the db2 instance user? Try running db2 commands from db2cmd window as the user that's trying to run the DB2 tests. If you cannot, that's a strong indicator :-) If that is the case - or possibly even if it isn't - try running <DB2_root_dir>/sqllib/db2profile and see if that fixes the problem. On Feb 13, 2008 9:53 AM, <sc...@at...> wrote: > > > > Hi, > I have just installed PyDB2 by modifying the script setup.py. > 1. Add DB2_ROOT = "/opt/ibm/db2/V9.1" > 2. library_dirs=[dir_root_dir+'lib32'], > > But testing test_basic.py, receive the following error: > > Traceback (most recent call last): > File "test_basic.py", line 2, in ? > import DB2 > File "/usr/lib/python2.3/site-packages/DB2.py", line 10, in ? > import _db2 > ImportError: libdb2.so.1: cannot open shared object file: No such file or > directory > > > LIM SIN-CHEE > sc...@at... > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > PyDB2-discuss mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > > |