[python-sybase] Segentation faults when connecting to SQL Server 2000

hopfgartner hopfgartner at rolmail.net
Tue, 10 Sep 2002 11:13:28 +0200


On Tue, 10 Sep 2002 10:46:22 +0200
 Harri Pasanen <harri.pasanen@trema.com> wrote:
> 
> I saw exactly the same thing.   If you feel adventurous
> you can apply the 
> quick and dirty patch I have attached to effectively
> remove the threading 
> support which I suspect you are not using anyway.
> 
> Note that the patch is in no way cleaned to be final, it
> just works for me.
> 
> Just copy the Sybase.py from
> /usr/lib/python2.2/site-packages/Sybase.py
> to your test script directory, and run:
> 
> patch < Sybase.py.test-patch
> 
> Then your script has a chance of passing this hurdle...
> 
> -Harri

The message changed, the result is the same:

Traceback (most recent call last):
  File "sqlDumpTbl.py", line 143, in ?
    dump.dump()
  File "sqlDump.py", line 64, in dump
    obj_text = self.get_obj_definition(sp[0])
  File "sqlDumpTbl.py", line 31, in get_obj_definition
    self.sql_cursor.execute('SELECT name FROM sysobjects
WHERE id = ' +
  File "/usr/lib/python2.1/site-packages/Sybase.py", line
323, in execute
    self.nextset()
  File "/usr/lib/python2.1/site-packages/Sybase.py", line
422, in nextset
    self._raise_error(Error, 'ct_cancel')
  File "/usr/lib/python2.1/site-packages/Sybase.py", line
259, in _raise_error
    raise exc(text)
Sybase.Error: ct_cancel

The strange thing is, that the first query has alredy
succeded at this point. The failure happens always at the
second query.

Peter