From: Paul R. <pau...@ve...> - 2005-09-09 19:36:21
|
Bradley, I had this same problem. I patched the code, but just for reads (I don't need to write those values). I have attached the patch file. Dave Cole, can we get these into the repository? Paul Rensing On Mon, 2005-08-29 at 17:05 -0400, Bradley Feldman wrote: > Does not seem so.... Anyone have any ideas for a quick patch? Right now > I'm typecasting back done to int type (4 byte). > > Thanks, > > *Bradley > > Here's the traceback: > > File "/usr/lib/python2.4/site-packages/Sybase.py", line 392, in start > return _FetchNow.start(self, arraysize) > File "/usr/lib/python2.4/site-packages/Sybase.py", line 324, in start > self._row_result() > File "/usr/lib/python2.4/site-packages/Sybase.py", line 345, in > _read_result > while _fetch_rows(self._cmd, bufs, logical_result): > File "/usr/lib/python2.4/site-packages/Sybase.py", line 267, in > _fetch_rows > rows.append(_extract_row(bufs, 0)) > File "/usr/lib/python2.4/site-packages/Sybase.py", line 242, in > _extract_row > row[col] = _column_value(buf[n]) > TypeError: unknown data format > > --- > > def _column_value(val): > if use_datetime and type(val) is DateTimeType: > return DateTime.DateTime(val.year, val.month + 1, val.day, > val.hour, val.minute, > val.second + val.msecond / 1000.0) > else: > return val > > def _extract_row(bufs, n): > '''Extract a row tuple from buffers. > ''' > row = [None] * len(bufs) > col = 0 > for buf in bufs: > --->>>> row[col] = _column_value(buf[n]) <----- ERROR HERE > col = col + 1 > return tuple(row) > > _______________________________________________ > Python-sybase mailing list > Pyt...@ww... > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase -- Paul Rensing <pau...@ve...> |