[python-sybase] Segmentation fault

David Lambert dlambert at lambsys.com
Mon, 06 Sep 2004 06:29:40 -0500


I am new to this module, so please excuse the naive question. I have the 
follwing test program on a Fedora  Core 2 Linux
system:

import Sybase

db =  Sybase.connect("TRAX", "etraxsales_user", "RxF39pqm")

print "db connect done"

c = db.cursor()

c.execute("select * from traffic_counter where traffic_count = 200")

print "Query done"
print c.fetchone()


Running the above test produses the following results (Note that I have 
inserted some debug print statement in the Sybase.py module). The user 
name and password are valid as the database is only for test purposes.

Any help would be appreciated.

Regards,

David Lambert.

[dlambert@security pySybase]$ python testSybase.py
Entering Sybase module
db connect done
Trying to open connection
Successfully opened connection
cmd = <CommandType object at 0xf6ffa800>
sql = select * from traffic_counter where traffic_count = 200
params.items() =  []
Successful end of cursor execute
Query done
In cursor fetchone()
just before _fetcher.fetchone(). _fetcher = <Sybase._FetchLazy instance 
at 0xf6ffa78c>
In _FetchLazy.fetchone(). State = 1
Length of array = 0
Array_pos =  0
Before _fetch_rows
After _fetch_rows
Segmentation fault