[python-sybase] NameError when calling fetchone() etc.

Ashley Glassel ashley_glassel at hotmail.com
Thu, 23 Jan 2003 08:52:50 +1100


more information. I am using freetds v0.60 and python-sybase v0.35 

[root@the-box db-stuff]# python
Python 2.2.1 (#1, Aug 30 2002, 12:15:30)
[GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Sybase
>>> db = Sybase.connect('Server', 'user','passwd')
>>> c = db.cursor()
>>> c.execute("select * from docent.DRUser where userID = '50970'")
>>> c.fetchall()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/Sybase.py", line 489, in fetchall
    row = self.fetchone()
  File "/usr/lib/python2.2/site-packages/Sybase.py", line 409, in fetchone
    _array = _fetch_rows(self._cmd, self._bufs)
  File "/usr/lib/python2.2/site-packages/Sybase.py", line 193, in _fetch_rows
    elif status in (CS_ROW_FAIL, CS_FAIL, CS_CANCELED,
NameError: global name 'CS_PENDING' is not defined
>>>