You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
(3) |
Apr
(26) |
May
(7) |
Jun
|
Jul
(12) |
Aug
|
Sep
(13) |
Oct
(6) |
Nov
(14) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(31) |
Feb
(15) |
Mar
(6) |
Apr
(18) |
May
(11) |
Jun
(3) |
Jul
(7) |
Aug
(5) |
Sep
(6) |
Oct
(1) |
Nov
(2) |
Dec
(6) |
2004 |
Jan
(3) |
Feb
(3) |
Mar
(18) |
Apr
(4) |
May
(13) |
Jun
(32) |
Jul
(21) |
Aug
(22) |
Sep
(11) |
Oct
(2) |
Nov
(6) |
Dec
(5) |
2005 |
Jan
(4) |
Feb
(16) |
Mar
(21) |
Apr
(10) |
May
(1) |
Jun
(5) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(15) |
Nov
(20) |
Dec
|
2006 |
Jan
(3) |
Feb
(1) |
Mar
(3) |
Apr
(5) |
May
(4) |
Jun
(6) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(8) |
Nov
|
Dec
(12) |
2007 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(9) |
Jun
(1) |
Jul
(6) |
Aug
(5) |
Sep
(3) |
Oct
|
Nov
(5) |
Dec
(6) |
2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
(1) |
Dec
(4) |
2009 |
Jan
|
Feb
(2) |
Mar
(16) |
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(21) |
Sep
(11) |
Oct
(4) |
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2011 |
Jan
(9) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bong M. <bo...@te...> - 2003-12-31 23:21:46
|
Greetings! I've installed pymqi on an XP machine with Sybase 11 Version 3.11.00.xx client. I use VC++ 6.0 service pack 5. When I execute: db = pymqi.connect('SYBASE', 'SA', '') the python interpreter exits with an error dialog. The package compiles cleanly without any warnings. Am I missing something? Thanks! --bong |
From: Gregory B. <gn...@it...> - 2003-12-31 17:23:58
|
I find this: ! if DateTime.__name__ == 'datetime': ! return DateTime.datetime( exceeds even my tolerance for ugly hacks. What about something like this: try: import DateTime DT = DateTime.DateTime except ImportError: try: import mx.DateTime DT = mx.DateTime.DateTime except ImportError: try: import datetime DT = datetime.datetime except ImportError: DT = None # ... if DT and type(val) is DateTimeType: row[col] = DT(val.year, val.month + 1, val.day, # ... |
From: Novitsky, K. <Kon...@Dr...> - 2003-12-31 12:56:55
|
The current python-sybase doesn't seem to use the latest datetime module correctly. I've made a patch (attached), so if one of the maintainers wants to merge it with the main tree - great. Thanks, KN If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. |
From: Peter H. <han...@on...> - 2003-12-30 17:36:48
|
Sybase ASE uses parameters positional (in the order they are defined in ct_param) - even named parameters. An example: ---------------------- import Sybase db = Sybase.connect('SYBASE','sa','',database='data',auto_commit=1) db.execute('''create table test ( key1 varchar(10) not null, value1 varchar(10) null, value2 varchar(10) null, value3 varchar(10) null, value4 varchar(10) null, value5 varchar(10) null ) ''') # 1 # v = { '@key1' : 'key1', '@value1' : 'value1', '@value2' : 'value2', '@value3' : 'value3', '@value4' : 'value4', '@value5' : 'value5'} print "v=", v c = db.cursor() # 2 # c.execute('insert into test values (@key1,@value1,@value2,@value3,@value4,@value5)',v) # 3 # c.execute('select * from test') x = c.fetchone() print "x=", x # 4 # c.execute('''select * from test where key1=@key1 and value1=@value1 and value2=@value2 and value3=@value3 and value4=@value4 and value5=@value5''',v) y = c.fetchone() print "y=", y c.close() db.close() ---------------------- Running the example gives the following output: v= {'@key1': 'key1', '@value4': 'value4', '@value5': 'value5', '@value2': 'value2', '@value3': 'value3', '@value1': 'value1'} x= ('key1', 'value4', 'value5', 'value2', 'value3', 'value1') y= ('key1', 'value4', 'value5', 'value2', 'value3', 'value1') Conclusion: # 3 # shows, that in insert the parameters are applied not in the order of # 2 #, but in the order shown in # 1 # (i.e in the incidental internal order of the dictionary) and # 4 # shows, that this is true also for where-clauses. Consequence: a patch (for 0.36) # diff Sybase.py.original Sybase.py 246a247,249 > import re > re_params = re.compile(r'@\w+') > 681c684,685 < for name, value in params.items(): --- > for name in re_params.findall(sql): > value = params[name] This helps only in cursor.execute(); the rest of the module should be checked also. Question: Is anybody using this module? Regards, - Peter |
From: Peter H. <han...@on...> - 2003-12-27 07:17:12
|
-------------------- import Sybase db = Sybase.connect('SYBASE','sa','',database='data',auto_commit=1) try: db.execute('drop table test') except Sybase.Error: pass db.execute('''create table test ( key1 varchar(10) not null, value1 int null ) ''') -------------------- This seemingly trivial piece of code does not work as expected. It creates Traceback (most recent call last): File "a.py", line 10, in ? db.execute('''create table test ( File "/usr/lib/python2.3/site-packages/Sybase.py", line 906, in execute fetcher.start(self.arraysize) File "/usr/lib/python2.3/site-packages/Sybase.py", line 260, in start status = self._cmd.ct_send() File "/usr/lib/python2.3/site-packages/Sybase.py", line 157, in _clientmsg_cb raise DatabaseError(_fmt_client(msg)) Sybase.DatabaseError: Layer: 1, Origin: 1 ct_send(): user api layer: external error: This routine cannot be called because another command structure has results pending. Layer: 1, Origin: 1 ct_cmd_drop(): user api layer: external error: This routine can be called only if the command structure is idle. Fatal Python error: unexpected exception during garbage collection Aborted if the table 'test' does not exist already. A look through the mail archive shows, that several others have been baffled by this unexpected "results pending" problem and the workaround - closing and re-opening the connection in the exception handler - is obviously a crutch. A somewhat deeper look into the code of Sybase.py shows, that the exception handler catches an (irrelevant) informational message from the callback function - thus breaking the code of _FetchNow.start(), which would else call _cmd.ct_results(). We can change our code to -------------------- import Sybase def my_clientmsg_cb(ctx, conn, msg): print "+++ %s" % Sybase._fmt_client(msg) def my_servermsg_cb(ctx, conn, msg): if msg.msgnumber not in (5701, 5703): print "+++ %s" % Sybase._fmt_server(msg) Sybase._ctx.ct_callback(Sybase.CS_SET, Sybase.CS_CLIENTMSG_CB, my_clientmsg_cb) Sybase._ctx.ct_callback(Sybase.CS_SET, Sybase.CS_SERVERMSG_CB, my_servermsg_cb) db = Sybase.connect('SYBASE','sa','',database='data',auto_commit=1) try: db.execute('drop table test') except Sybase.Error: pass db.execute('''create table test ( key1 varchar(10) not null, value1 int null ) ''') -------------------- Now the code works. I the table 'test' does not exist, we get the message +++ Msg 3701, Level 11, State 1, Line 1 Cannot drop the table 'test', because it doesn't exist in the system catalogs. and then the table is created. But violating the privacy of _ctx is not good style. The next refactoring of Sybase.py may break the code. Therefore my proposal: The callback functions should be settable by an official method. At first I considered additional parameters in connect(). But the callback functions should be changable without a reconnect, so something in the style of set_property() would be preferable. Of course default handlers should be installed if the callback functions are not set explicitly. I would prefer to an exception an informational message as default; to react sensibly to an unexpected exception is rather difficult. Any opinions? - Peter |
From: <pau...@al...> - 2003-12-01 21:43:46
|
To everyone, I've been trying to install/compile this module, but I get the errors below. Running freetds 0.53, Python2.2.1 Upgrading Freetds is a last resort at the moment as I am unsure if any other progs use freetds on our server (php probably does and I do not really feel like recompiling that). I have tried all the modules from 0.3 --> 0.36 Anyone struck this error before or can anyone point me in the right direction to fix this? As a side note: I have got this module compiled/running on another server - also running freetds 0.53, python 2.2 but I cannot find out where the differences are between these two servers. (This second server is my development server:) Thank you Paul van Tuel Systems Engineer Allied Press Dunedin New Zealand ---------- running install running build running build_py not copying Sybase.py (output up-to-date) running build_ext building 'sybasect' extension skipping blk.c (build/temp.linux-i686-2.2/blk.o up-to-date) skipping databuf.c (build/temp.linux-i686-2.2/databuf.o up-to-date) gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -I/usr/local/freetds/include -I/usr/local/include/python2.2 -c cmd.c -o build/temp.linux-i686-2.2/cmd.o In file included from /usr/local/freetds/include/cspublic.h:23, from sybasect.h:10, from cmd.c:9: /usr/local/freetds/include/tds.h:514: warning: function declaration isn't a prototype /usr/local/freetds/include/tds.h:515: warning: function declaration isn't a prototype In file included from sybasect.h:10, from cmd.c:9: /usr/local/freetds/include/cspublic.h:63: warning: function declaration isn't a prototype /usr/local/freetds/include/cspublic.h:64: warning: function declaration isn't a prototype /usr/local/freetds/include/cspublic.h:79: warning: function declaration isn't a prototype /usr/local/freetds/include/cspublic.h:80: warning: function declaration isn't a prototype cmd.c: In function `CS_COMMAND_ct_bind': cmd.c:36: warning: implicit declaration of function `ct_bind' cmd.c: In function `CS_COMMAND_ct_cancel': cmd.c:80: warning: implicit declaration of function `ct_cancel' cmd.c: In function `CS_COMMAND_ct_cmd_drop': cmd.c:111: warning: implicit declaration of function `ct_cmd_drop' cmd.c: In function `CS_COMMAND_ct_command': cmd.c:162: warning: implicit declaration of function `ct_command' cmd.c:224: `CS_SEND_DATA_CMD' undeclared (first use in this function) cmd.c:224: (Each undeclared identifier is reported only once cmd.c:224: for each function it appears in.) cmd.c:232: `CS_COLUMN_DATA' undeclared (first use in this function) cmd.c: In function `CS_COMMAND_ct_describe': cmd.c:522: warning: implicit declaration of function `ct_describe' cmd.c: In function `CS_COMMAND_ct_fetch': cmd.c:690: warning: implicit declaration of function `ct_fetch' cmd.c: In function `CS_COMMAND_ct_get_data': cmd.c:723: warning: implicit declaration of function `ct_get_data' cmd.c: In function `CS_COMMAND_ct_param': cmd.c:764: warning: implicit declaration of function `ct_param' cmd.c: In function `CS_COMMAND_ct_res_info': cmd.c:871: warning: implicit declaration of function `ct_res_info' cmd.c: In function `CS_COMMAND_ct_results': cmd.c:1036: warning: implicit declaration of function `ct_results' cmd.c: In function `CS_COMMAND_ct_send': cmd.c:1067: warning: implicit declaration of function `ct_send' cmd.c: In function `cmd_alloc': cmd.c:1206: warning: implicit declaration of function `ct_cmd_alloc' error: command 'gcc' failed with exit status 1 -------------- |
From: <yj...@be...> - 2003-11-08 10:33:36
|
I am new to sybase module. I tried to follow the instruction on the page of "Installation on Windows Using the Free Borland Compiler", which Andy Hood wrote. When I started running "python setup.py install", everything went through fine until ilink32.exe started linking all the library together. A series of Errors occurred and ilink32.exe failed. The errors are : c:\Borland\BCC55\Bin\ilink32.exe /Tpd /Gn /q /x /LC:\Progra~1\Sybase\lib /LC:\Py thon22\libs /L. c0d32 build\temp.win32-2.2\Release\blk.obj build\temp.win32-2.2\ Release\databuf.obj build\temp.win32-2.2\Release\cmd.obj build\temp.win32-2.2\Re lease\conn.obj build\temp.win32-2.2\Release\ctx.obj build\temp.win32-2.2\Release \datafmt.obj build\temp.win32-2.2\Release\iodesc.obj build\temp.win32-2.2\Releas e\locale.obj build\temp.win32-2.2\Release\msgs.obj build\temp.win32-2.2\Release\ numeric.obj build\temp.win32-2.2\Release\money.obj build\temp.win32-2.2\Release\ datetime.obj build\temp.win32-2.2\Release\sybasect.obj , build\lib.win32-2.2\syb asect.pyd ,, C:\Progra~1\Sybase\lib\libblk.lib C:\Progra~1\Sybase\lib\libct.lib C:\Progra~1\Sybase\lib\libcs.lib C:\Python22\libs\python22.lib import32 cw32mt , build\temp.win32-2.2\Release\sybasect.def , Error: Unresolved external '_PyTuple_Type' referenced from C:\SYBASE-0.36\BUILD\ TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_PyType_IsSubtype' referenced from C:\SYBASE-0.36\BU ILD\TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_PyExc_SystemError' referenced from C:\SYBASE-0.36\B UILD\TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_PyTuple_GetItem' referenced from C:\SYBASE-0.36\BUI LD\TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_PyInt_AsLong' referenced from C:\SYBASE-0.36\BUILD\ TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_PyObject_CallMethod' referenced from C:\SYBASE-0.36 \BUILD\TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_PyEval_CallObjectWithKeywords' referenced from C:\S YBASE-0.36\BUILD\TEMP.WIN32-2.2\RELEASE\CTX.OBJ Error: Unresolved external '_PyErr_Fetch' referenced from C:\SYBASE-0.36\BUILD\T EMP.WIN32-2.2\RELEASE\CTX.OBJ Error: Unresolved external '_PyErr_Restore' referenced from C:\SYBASE-0.36\BUILD \TEMP.WIN32-2.2\RELEASE\CTX.OBJ Error: Unresolved external '_PyInt_Type' referenced from C:\SYBASE-0.36\BUILD\TE MP.WIN32-2.2\RELEASE\CTX.OBJ Error: Unresolved external '_PyObject_Init' referenced from C:\SYBASE-0.36\BUILD \TEMP.WIN32-2.2\RELEASE\MSGS.OBJ Error: Unresolved external '_PyString_FromStringAndSize' referenced from C:\SYBA SE-0.36\BUILD\TEMP.WIN32-2.2\RELEASE\MSGS.OBJ Error: Unresolved external '_PyMember_Get' referenced from C:\SYBASE-0.36\BUILD\ TEMP.WIN32-2.2\RELEASE\MSGS.OBJ Error: Unresolved external '_PyExc_AttributeError' referenced from C:\SYBASE-0.3 6\BUILD\TEMP.WIN32-2.2\RELEASE\MSGS.OBJ Error: Unresolved external '_PyErr_SetString' referenced from C:\SYBASE-0.36\BUI LD\TEMP.WIN32-2.2\RELEASE\MSGS.OBJ Error: Unresolved external '_PyMember_Set' referenced from C:\SYBASE-0.36\BUILD\ TEMP.WIN32-2.2\RELEASE\MSGS.OBJ Error: Unresolved external '_PyErr_NoMemory' referenced from C:\SYBASE-0.36\BUIL D\TEMP.WIN32-2.2\RELEASE\DATABUF.OBJ Error: Unresolved external '_PyArg_ParseTuple' referenced from C:\SYBASE-0.36\BU ILD\TEMP.WIN32-2.2\RELEASE\DATAFMT.OBJ Error: Unresolved external '_PyErr_Clear' referenced from C:\SYBASE-0.36\BUILD\T EMP.WIN32-2.2\RELEASE\DATAFMT.OBJ Error: Unresolved external '_Py_FindMethod' referenced from C:\SYBASE-0.36\BUILD \TEMP.WIN32-2.2\RELEASE\DATAFMT.OBJ Error: Unresolved external '_PyString_Type' referenced from C:\SYBASE-0.36\BUILD \TEMP.WIN32-2.2\RELEASE\DATAFMT.OBJ Error: Unresolved external '_PyErr_BadArgument' referenced from C:\SYBASE-0.36\B UILD\TEMP.WIN32-2.2\RELEASE\DATAFMT.OBJ Error: Unresolved external '_PyString_Size' referenced from C:\SYBASE-0.36\BUILD \TEMP.WIN32-2.2\RELEASE\DATAFMT.OBJ Error: Unresolved external '_PyExc_TypeError' referenced from C:\SYBASE-0.36\BUI LD\TEMP.WIN32-2.2\RELEASE\DATAFMT.OBJ Error: Unresolved external '_PyString_AsString' referenced from C:\SYBASE-0.36\B UILD\TEMP.WIN32-2.2\RELEASE\DATAFMT.OBJ Error: Unresolved external '_PyLong_Type' referenced from C:\SYBASE-0.36\BUILD\T EMP.WIN32-2.2\RELEASE\DATABUF.OBJ Error: Unresolved external '_PyObject_Str' referenced from C:\SYBASE-0.36\BUILD\ TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyFloat_AsDouble' referenced from C:\SYBASE-0.36\BU ILD\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyString_FromString' referenced from C:\SYBASE-0.36 \BUILD\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyObject_Hash' referenced from C:\SYBASE-0.36\BUILD \TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyFloat_Type' referenced from C:\SYBASE-0.36\BUILD\ TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyInt_FromLong' referenced from C:\SYBASE-0.36\BUIL D\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyLong_FromString' referenced from C:\SYBASE-0.36\B UILD\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyFloat_FromDouble' referenced from C:\SYBASE-0.36\ BUILD\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyErr_Occurred' referenced from C:\SYBASE-0.36\BUIL D\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_Py_BuildValue' referenced from C:\SYBASE-0.36\BUILD \TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyImport_ImportModule' referenced from C:\SYBASE-0. 36\BUILD\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyObject_GetAttrString' referenced from C:\SYBASE-0 .36\BUILD\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyDict_GetItemString' referenced from C:\SYBASE-0.3 6\BUILD\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyObject_CallFunction' referenced from C:\SYBASE-0. 36\BUILD\TEMP.WIN32-2.2\RELEASE\NUMERIC.OBJ Error: Unresolved external '_PyExc_IndexError' referenced from C:\SYBASE-0.36\BU ILD\TEMP.WIN32-2.2\RELEASE\DATABUF.OBJ Error: Unresolved external '__Py_NoneStruct' referenced from C:\SYBASE-0.36\BUIL D\TEMP.WIN32-2.2\RELEASE\DATABUF.OBJ Error: Unresolved external '_PyList_New' referenced from C:\SYBASE-0.36\BUILD\TE MP.WIN32-2.2\RELEASE\CMD.OBJ Error: Unresolved external '_PyList_SetItem' referenced from C:\SYBASE-0.36\BUIL D\TEMP.WIN32-2.2\RELEASE\CMD.OBJ Error: Unresolved external '_PyCallable_Check' referenced from C:\SYBASE-0.36\BU ILD\TEMP.WIN32-2.2\RELEASE\CTX.OBJ Error: Unresolved external '_PyExc_ValueError' referenced from C:\SYBASE-0.36\BU ILD\TEMP.WIN32-2.2\RELEASE\CTX.OBJ Error: Unresolved external '_PyType_Type' referenced from C:\SYBASE-0.36\BUILD\T EMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_Py_InitModule4' referenced from C:\SYBASE-0.36\BUIL D\TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_PyModule_GetDict' referenced from C:\SYBASE-0.36\BU ILD\TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_PyDict_SetItemString' referenced from C:\SYBASE-0.3 6\BUILD\TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ Error: Unresolved external '_Py_FatalError' referenced from C:\SYBASE-0.36\BUILD \TEMP.WIN32-2.2\RELEASE\SYBASECT.OBJ error: command 'ilink32.exe' failed with exit status 2 I did search on those "Unresolvd external references". They are all in "c:\python22\libs\python22.lib" and this library does exist in the ilink32.exe command. Is it because I used python22? (He mentioned python21 in his article ). I really need to by-pass this problem and keep going. Can anybody help me about this? yjchi |
From: Jon D. <jo...@to...> - 2003-11-07 17:41:40
|
Hi I'm using twisted 110 and the adbapi ConnectionPool class. I have a small 'toy' script which starts up and runs three of four queries under the twisted event loop, (which will actually do the query in a seperate thread.) If I compile the Sybase module without the WANT_THREADS flag, the script appears to work. When compiled with the FLAG, it sometimes hangs or SEGV's. I managed to get Sybase built with debug info and the stack trace is below. I only compiled the Module with the flag set after reading that twisted would defer the call to a thread, is it necessary. Context: Python 2.3.2, solaris 5.6, sun compiler cc dbx) where current thread: t@5 [1] netp_checkextfds(0x403d00, 0xef00506c, 0x29c340, 0x29c3a8, 0x403d00, 0x47798c), at 0xee85d1ec [2] netp_callback_poll(0x403d00, 0x1388, 0xef10716c, 0x2b659c, 0x1, 0x0), at 0xee85a660 [3] syb_net_callback(0x403d00, 0x1388, 0xef10716c, 0x2b659c, 0x0, 0x0), at 0xee85007c [4] np_ctx_wait(0x3ba860, 0x23e190, 0x1388, 0x0, 0xef1071d4, 0x0), at 0xee8d1658 [5] com_async_poll(0x3ba860, 0x23e190, 0x1388, 0x5, 0x0, 0x0), at 0xee78609c [6] ct__api_connect_async(0x47e8b0, 0x0, 0xfffffff7, 0x0, 0x0, 0x0), at 0xee8a5ff0 [7] ct_connect(0x47e8b0, 0x1eda5c, 0xfffffff7, 0x1eda48, 0x2a6584, 0x63745f63), at 0xee8a6278 =>[8] CS_CONNECTION_ct_connect(self = 0x4835c0, args = 0x3faad0), line 310 in "conn.c" [9] call_function(0xef107518, 0x3faad0, 0x12035c, 0x0, 0x1, 0x1), at 0x7df50 [10] eval_frame(0x3c3880, 0x2a6574, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b34c [11] fast_function(0x3f82f0, 0xef107780, 0x1, 0x405230, 0x2a6428, 0x480ef8), at 0x7e1a4 [12] call_function(0xef107780, 0x47e87c, 0x480e90, 0x0, 0x1, 0x1), at 0x7e040 [13] eval_frame(0x3c3810, 0x47e84c, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b34c [14] PyEval_EvalCodeEx(0x3d4aa0, 0x9, 0x9, 0x0, 0x3f88bc, 0x0), at 0x7c944 [15] function_call(0x3f81f0, 0x3f88b0, 0x0, 0x5, 0x3de2ac, 0x0), at 0xbc930 [16] PyObject_Call(0x3f81f0, 0x3f88b0, 0x0, 0x19de60, 0x272, 0x1e), at 0x2b6ac [17] instancemethod_call(0x8, 0x3f88b0, 0x0, 0x3f6660, 0x3f81f0, 0x480e90), at 0x318fc [18] PyObject_Call(0x480a30, 0x1e3af0, 0x0, 0x480a30, 0x3de2dc, 0x233068), at 0x2b6ac [19] PyEval_CallObjectWithKeywords(0x480a30, 0x1e3af0, 0x0, 0x0, 0x0, 0x1e3b1d), at 0x7dc38 [20] PyInstance_New(0x152000, 0x1e3af0, 0x0, 0x480a30, 0x480e90, 0xef108144), at 0x2d7bc [21] PyObject_Call(0x3f6660, 0x1e3af0, 0x0, 0x2a9970, 0x3afcf8, 0x1a8), at 0x2b6ac [22] do_call(0x0, 0xef107f10, 0x8, 0x0, 0x3f6660, 0x0), at 0x7e5c4 [23] call_function(0xef107f10, 0x2a6230, 0x62f8d952, 0x0, 0x8, 0x8), at 0x7e05c [24] eval_frame(0x3d64b0, 0x2a620c, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b34c [25] PyEval_EvalCodeEx(0x3da060, 0x3de2dc, 0x14, 0x20, 0x5, 0x0), at 0x7c944 [26] function_call(0x3f1730, 0x1e8300, 0x1, 0x5, 0x3de2dc, 0x233068), at 0xbc930 [27] PyObject_Call(0x3f1730, 0x1e8300, 0x3cf390, 0x4805a4, 0x13c114, 0x3), at 0x2b6ac [28] PyEval_CallObjectWithKeywords(0x3f1730, 0x1e8300, 0x3cf390, 0x3, 0xef108138, 0xef108144), at 0x7dc38 [29] builtin_apply(0x0, 0x480af8, 0x0, 0x7019c, 0x0, 0x480b11), at 0x702fc [30] call_function(0xef108330, 0x480af8, 0x12035c, 0x0, 0x3, 0x3), at 0x7df50 [31] eval_frame(0x1f01e0, 0x2a73a4, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b34c [32] fast_function(0x2075b0, 0xef108598, 0x1, 0x405230, 0x2a7258, 0x8), at 0x7e1a4 [33] call_function(0xef108598, 0x2a2bc0, 0x1f39e0, 0x0, 0x1, 0x1), at 0x7e040 [34] eval_frame(0x18bf80, 0x2a2ba4, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b34c [35] PyEval_EvalCodeEx(0x1ef7a0, 0x1, 0x2, 0x487ae0, 0x480564, 0x0), at 0x7c944 [36] function_call(0x2078b0, 0x480558, 0x0, 0x0, 0x0, 0x233028), at 0xbc930 [37] PyObject_Call(0x2078b0, 0x480558, 0x487150, 0xef1088e8, 0x2dc0f8, 0x2), at 0x2b6ac [38] ext_do_call(0x2078b0, 0x1, 0x3, 0x0, 0x480558, 0x487150), at 0x7e7f8 [39] eval_frame(0x1f37b0, 0x2a71f4, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b4b4 [40] PyEval_EvalCodeEx(0x1f41e0, 0x4, 0x4, 0x0, 0x4834ec, 0x0), at 0x7c944 [41] function_call(0x1f45b0, 0x4834e0, 0x0, 0x0, 0x0, 0x233008), at 0xbc930 [42] PyObject_Call(0x1f45b0, 0x4834e0, 0x4879c0, 0xef108c38, 0x480b20, 0x0), at 0x2b6ac [43] ext_do_call(0x1f45b0, 0x4, 0x3, 0x0, 0x4834e0, 0x4879c0), at 0x7e7f8 [44] eval_frame(0x2141e8, 0x2a29d4, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b4b4 [45] PyEval_EvalCodeEx(0x21fee0, 0x3, 0x7, 0x4879c0, 0x3f33f4, 0x0), at 0x7c944 [46] function_call(0x2d0d70, 0x3f33e8, 0x0, 0x0, 0x0, 0x233018), at 0xbc930 [47] PyObject_Call(0x2d0d70, 0x3f33e8, 0x487780, 0xef108f88, 0x2a2888, 0x8), at 0x2b6ac [48] ext_do_call(0x2d0d70, 0x4, 0x3, 0x0, 0x3f33e8, 0x487780), at 0x7e7f8 [49] eval_frame(0x271030, 0x2a7044, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b4b4 [50] PyEval_EvalCodeEx(0x2d0b20, 0x3, 0x7, 0x487780, 0x3f318c, 0x0), at 0x7c944 [51] function_call(0x2d0e70, 0x3f3180, 0x0, 0x0, 0x0, 0x232ff8), at 0xbc930 [52] PyObject_Call(0x2d0e70, 0x3f3180, 0x487300, 0xef1092d8, 0x2a6ef8, 0x8), at 0x2b6ac [53] ext_do_call(0x2d0e70, 0x4, 0x3, 0x0, 0x3f3180, 0x487300), at 0x7e7f8 [54] eval_frame(0x1fbad0, 0x2a1824, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b4b4 [55] PyEval_EvalCodeEx(0x3f8560, 0x2, 0x2, 0x0, 0x48049c, 0x0), at 0x7c944 [56] function_call(0x481f70, 0x480490, 0x0, 0x0, 0x0, 0x232fe8), at 0xbc930 [57] PyObject_Call(0x481f70, 0x480490, 0x3e2c00, 0xef109628, 0x13c114, 0x3), at 0x2b6ac [58] ext_do_call(0x481f70, 0x1, 0x3, 0x0, 0x480490, 0x3e2c00), at 0x7e7f8 [59] eval_frame(0x3e3f50, 0x299874, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b4b4 [60] fast_function(0x3f0eb0, 0xef109890, 0x1, 0x405230, 0x299728, 0x3e2afc), at 0x7e1a4 [61] call_function(0xef109890, 0x2a4490, 0x3faa10, 0x0, 0x1, 0x1), at 0x7e040 [62] eval_frame(0x3e6bf0, 0x2a4484, 0x1219a4, 0x13c120, 0x13c114, 0x0), at 0x7b34c [63] PyEval_EvalCodeEx(0x3e6d60, 0x1, 0x1, 0x0, 0x3faa5c, 0x0), at 0x7c944 [64] function_call(0x3f0ef0, 0x3faa50, 0x0, 0x0, 0x0, 0x0), at 0xbc930 [65] PyObject_Call(0x3f0ef0, 0x3faa50, 0x0, 0x534d, 0x2b0858, 0x2b0840), at 0x2b6ac [66] instancemethod_call(0x0, 0x3faa50, 0x0, 0x40bdc8, 0x3f0ef0, 0x3faa10), at 0x318fc [67] PyObject_Call(0x480a08, 0x158030, 0x0, 0x0, 0x0, 0x0), at 0x2b6ac [68] PyEval_CallObjectWithKeywords(0x480a08, 0x158030, 0x0, 0x0, 0x0, 0x0), at 0x7dc38 [69] t_bootstrap(0x234f28, 0x405230, 0x1, 0xef518340, 0x1, 0xef516bf0), at 0xa116c (dbx) the listing is the SEGV is line 310 in ct_connect. (dbx) list 285 330 285 286 static PyObject *CS_CONNECTION_ct_connect(CS_CONNECTIONObj *self, PyObject *args) 287 { 288 CS_RETCODE status; 289 char *dsn = NULL; 290 291 if (!PyArg_ParseTuple(args, "|s", &dsn)) 292 return NULL; 293 294 if (self->conn == NULL) { 295 PyErr_SetString(PyExc_TypeError, "CS_CONNECTION has been dropped"); 296 return NULL; 297 } 298 299 /* PyErr_Clear(); */ 300 if (dsn == NULL) { 301 SY_CONN_BEGIN_THREADS(self); 302 status = ct_connect(self->conn, NULL, 0); 303 SY_CONN_END_THREADS(self); 304 305 if (self->debug) 306 debug_msg("ct_connect(conn%d, NULL, 0) -> %s\n", 307 self->serial, value_str(VAL_STATUS, status)); 308 } else { 309 SY_CONN_BEGIN_THREADS(self); 310 status = ct_connect(self->conn, dsn, CS_NULLTERM); 311 SY_CONN_END_THREADS(self); 312 313 if (self->debug) 314 debug_msg("ct_connect(conn%d, \"%s\", CS_NULLTERM) -> %s\n", 315 self->serial, dsn, value_str(VAL_STATUS, status)); 316 } 317 if (PyErr_Occurred()) 318 return NULL; 319 320 return PyInt_FromLong(status); 321 } some local variables are :- (dbx) print status status = 1 (dbx) print dsn dsn = 0x1eda5c "SQL_MIDOFF_PDS1" (dbx) print *self *self = { ob_refcnt = 4 ob_type = 0xee9cb3f0 ctx = 0x3c3f70 conn = 0x47e8b0 strip = 0 debug = 0 serial = 0 lock = (nil) thread_state = 0x405230 released_lock = 1 reenter_count = 0 next = (nil) } (dbx) print *args *args = { ob_refcnt = 1 ob_type = 0x12500c Any ideas Jon |
From: Donnie M. <drm...@pl...> - 2003-10-25 08:56:32
|
I saw a discussion about rowcount back in May, but I did not ever find a resolution. Is there one? Can the number of rows affected be determined (in 0.36)? I would appreciate any help. Thanks -- Donnie Miller |
From: Scot R. <sco...@fi...> - 2003-09-19 09:01:50
|
Scot Roberts wrote: > Hello all, > > I'm trying to use 0.36 on Windows 2000 pro machine with Python 2.3 to > access an ASE 12 server (also on Windows 2000). However Python dies with > an application error 'The instruction at "0x009c5430" referenced memory > at "0x00000000". The memory could not be written". Clicking on cancel > brings up Visual C++ , which pops up a dialog saying unhandled exception > in python.exe: 0xc0000005: Access Violation. > > > Looking through the list archives I see I'm not the only person to have > had this problem, but I didn't find a solution. Does anybody have any > ideas? I've been trying to figure out where it's going wriong by commenting out various lines of Sybase.py and it looks like it's exploding in the connect method of the Connection object when it runs this line: status = conn.ct_connect(self.dsn) cheers Scot www.five.tv _______________________________________________________ This e-mail may contain information that is privileged, confidential or otherwise protected from disclosure. It must not be used by or its contents copied or disclosed to persons other than the intended recipient. Any liability arising from any third party acting or refraining from acting on any information contained in this e-mail is excluded. If you have received this e-mail in error please notify the sender immediately and delete it and any copies from your computer and network. This e-mail has been checked for viruses but it is the responsibility of the recipient to ensure that the opening use or onward transmission of the e-mail and any attachments will not adversely affect its systems or data and no responsibility is accepted by Five in this regard. _______________________________________________________ |
From: Scot R. <sco...@fi...> - 2003-09-19 08:33:32
|
Hello all, I'm trying to use 0.36 on Windows 2000 pro machine with Python 2.3 to access an ASE 12 server (also on Windows 2000). However Python dies with an application error 'The instruction at "0x009c5430" referenced memory at "0x00000000". The memory could not be written". Clicking on cancel brings up Visual C++ , which pops up a dialog saying unhandled exception in python.exe: 0xc0000005: Access Violation. Looking through the list archives I see I'm not the only person to have had this problem, but I didn't find a solution. Does anybody have any ideas? cheers Scot www.five.tv _______________________________________________________ This e-mail may contain information that is privileged, confidential or otherwise protected from disclosure. It must not be used by or its contents copied or disclosed to persons other than the intended recipient. Any liability arising from any third party acting or refraining from acting on any information contained in this e-mail is excluded. If you have received this e-mail in error please notify the sender immediately and delete it and any copies from your computer and network. This e-mail has been checked for viruses but it is the responsibility of the recipient to ensure that the opening use or onward transmission of the e-mail and any attachments will not adversely affect its systems or data and no responsibility is accepted by Five in this regard. _______________________________________________________ |
From: Scot McSweeney-R. <s_m...@ta...> - 2003-09-19 08:01:00
|
Hello all, I'm trying to use 0.36 on Windows 2000 pro machine with Python 2.3 to access an ASE 12 server (also on Windows 2000). However Python dies with an application error 'The instruction at "0x009c5430" referenced memory at "0x00000000". The memory could not be written". Clicking on cancel brings up Visual C++ , which pops up a dialog saying unhandled exception in python.exe: 0xc0000005: Access Violation. Looking through the list archives I see I'm not the only person to have had this problem, but I didn't find a solution. Does anybody have any ideas? cheers Scot |
From: Will R. <wr...@ra...> - 2003-09-17 10:28:37
|
Is there any way to execute queries containing unicode characters? such as this... select 'ø' I'm using version 0.36 of the Sybase module to talk to MSSQL 2000, python 2.2.2, and FreeTDS version 0.61. I have already managed to migrate 90% of a database (any tables that don't contain unicode characters) using this setup, but I get an error when I try to execute queries containing unicode characters. I am able to insert unicode characters into MSSQL using it's gui tools, then pull them out via python and the Sybase module (as long as the select query itself does not contain unicode characters). Is it possible to make this work? Here is the code sample and the traceback. CODE SAMPLE........ import Sybase conn = Sybase.connect('migration','migration','migration','migration') conn.connect() c = conn.cursor() sql = u"""select '\xf8'""" usql = sql.encode('utf-8') print usql c.execute(usql) print c.fetchall() RESULTS........... select 'ø' Traceback (most recent call last): File "test.py", line 11, in ? c.execute(usql) File "/usr/lib/python2.2/site-packages/Sybase.py", line 687, in execute self.description = fetcher.start(self.arraysize) File "/usr/lib/python2.2/site-packages/Sybase.py", line 442, in start return self._start_results() File "/usr/lib/python2.2/site-packages/Sybase.py", line 546, in _start_results status, result = self._cmd.ct_results() File "/usr/lib/python2.2/site-packages/Sybase.py", line 161, in _servermsg_cb raise DatabaseError(_fmt_server(msg)) Sybase.DatabaseError: Msg 105, Level 15, State 1, Line 1 Unclosed quotation mark before the character string '???'.Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near '???'. Any help would be greatly appreciated. -- Will |
From: Andrew M. <an...@ob...> - 2003-09-12 20:33:29
|
>I found a post from April for this problem, but there was no resolution >in the archives. > >I am attempting to use the Sybase module on Solaris 8 with Sybase 12.5. >Everything installs fine, but when I try to 'import Sybase', I get the >following error: > >>>> import Sybase >Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 20, in ? > from sybasect import * >ImportError: ld.so.1: python: fatal: relocation error: file >/opt/sybase/sol/OCS/lib/libct.so: symbol dcl_result_drop: referenced >symbol not found I'm just guessing here, but Solaris has a cute shared library search path mechanism - you can use one path while building (-L), but specify an alternate path to use when running (-R). What's probably happened is that -L has been specified while building, which has allowed the build to complete, but then when you go to run, you've only got the default system path. You can use "ldd" to find out what /opt/sybase/sol/OCS/lib/libct.so is dependant on (and what's missing). You can rebuild specifying -R at link time (just make it the same as -L), or you can use LD_LIBRARY_PATH. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ |
From: Todd B. <fn...@ua...> - 2003-09-12 16:12:22
|
I found a post from April for this problem, but there was no resolution in the archives. I am attempting to use the Sybase module on Solaris 8 with Sybase 12.5. Everything installs fine, but when I try to 'import Sybase', I get the following error: >>> import Sybase Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 20, in ? from sybasect import * ImportError: ld.so.1: python: fatal: relocation error: file /opt/sybase/sol/OCS/lib/libct.so: symbol dcl_result_drop: referenced symbol not found I would be grateful for any ideas on how to solve this. Thanks, Todd |
From: alan r. <ru...@ru...> - 2003-08-19 17:17:48
|
Hi. (Dont ask me why) but I had my database/trnx log size set to 2MB. It seems when the trnx log fills up and the database adapter attempts to raise a DatabaseError exception in Sybase._servermsg_cb the adapter hangs. It ends up saying something like, "Your transaction log is almost full all operations will be halted until you increase your size". But since the DatabaseError hangs I couldnt tell why it was dying. It seems that it can format the message but instiantiating the DatabaseError exception python halts. any ideas? I'm not yet subscribed please CC me. george a. runyan jr. |
From: Hrvoje N. <hn...@is...> - 2003-08-14 08:55:13
|
Hrvoje Niksic wrote: > I'm using python-sybase with MS SQL 6.5 and FreeTDS 0.61. I keep > stumbling upon this: [...] In case someone else has problems with this, here is a possible (and extremely kludgy) workaround. Of course, that's not a long-term solution, but it helps me write compliant application until the problem is fixed. import Sybase def replacefun(oldfun, exception_class, exception_arg, altresult): def newfun(*argl, **argk): try: res = oldfun(*argl, **argk) except exception_class, e: if e.args[0] == exception_arg: return altresult else: raise return res return newfun Sybase.Cursor.fetchone = replacefun(Sybase.Cursor.fetchone, Sybase.ProgrammingError, 'no result set pending', None) Sybase.Cursor.fetchall = replacefun(Sybase.Cursor.fetchall, Sybase.ProgrammingError, 'no result set pending', []) |
From: <ra...@ar...> - 2003-08-14 05:16:47
|
Hello there. I think I have solved this before, but I cannot remember how. I am using Debian Woody + some add-ons I build freeTDS from source ./configure --enable-threadsafe make make install I build Sybase SYBASE=/usr/local/ python2.2 setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY -D WANT_THREADS I get this: gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c cmd.c -o build/temp.linux-i686-2.2/cmd.o cmd.c: In function `CS_COMMAND_ct_param': cmd.c:787: warning: overflow in implicit constant conversion gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c conn.c -o build/temp.linux-i686-2.2/conn.o conn.c: In function `CS_CONNECTION_ct_diag': conn.c:82: warning: implicit declaration of function `ct_diag' gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c ctx.c -o build/temp.linux-i686-2.2/ctx.o gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c datafmt.c -o build/temp.linux-i686-2.2/datafmt.o gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c iodesc.c -o build/temp.linux-i686-2.2/iodesc.o gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c locale.c -o build/temp.linux-i686-2.2/locale.o gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c msgs.c -o build/temp.linux-i686-2.2/msgs.o msgs.c:144: structure has no member named `sqlstate' msgs.c:144: initializer element is not constant msgs.c:144: (near initialization for `CS_SERVERMSG_memberlist[8].offset') msgs.c: In function `CS_SERVERMSG_getattr': msgs.c:154: structure has no member named `textlen' msgs.c:164: structure has no member named `sqlstate' msgs.c:165: structure has no member named `sqlstatelen' error: command 'gcc' failed with exit status 1 ++++++++ If I try without -D WANT_THREADS (I do want them) the module builds OK, but then I get this Python 2.2.1 (#1, Sep 7 2002, 14:34:30) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Sybase Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/site-packages/Sybase.py", line 20, in ? from sybasect import * ImportError: /usr/lib/python2.2/site-packages/sybasect.so: undefined symbol: ct_diag Thank you very much. Any pointers? |
From: Hrvoje N. <hn...@is...> - 2003-08-14 03:40:46
|
I'm using python-sybase with MS SQL 6.5 and FreeTDS 0.61. I keep stumbling upon this: >>> import Sybase >>> conn=Sybase.connect(...) >>> c=conn.cursor() >>> c.execute("select * from customer where name='nosuchname'") >>> c.fetchall() Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 733, in fetchall return self._fetcher.fetchall() File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 517, in fetchall row = self.fetchone() File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 448, in fetchone self._raise_error(ProgrammingError, 'no result set pending') File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 432, in _raise_error raise exc(text) Sybase.ProgrammingError: no result set pending >>> Shouldn't fetchall() simply return an empty list when no results are available? |
From: Hrvoje N. <hn...@is...> - 2003-08-13 11:37:44
|
I'm using python-sybase with MS SQL 6.5 and FreeTDS 0.61. I keep stumbling upon this: >>> import Sybase >>> conn=Sybase.connect(...) >>> c=conn.cursor() >>> c.execute("select * from customer where name='nosuchname'") >>> c.fetchall() Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 733, in fetchall return self._fetcher.fetchall() File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 517, in fetchall row = self.fetchone() File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 448, in fetchone self._raise_error(ProgrammingError, 'no result set pending') File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 432, in _raise_error raise exc(text) Sybase.ProgrammingError: no result set pending >>> Shouldn't fetchall() simply return an empty list when no results are available? |
From: Scott A. <sc...@tp...> - 2003-07-16 11:25:22
|
DOH! Had that set incorrectly....jeez....thanks! Scott -----Original Message----- From: Jeff Younker [mailto:jyo...@of...] Sent: Tuesday, July 15, 2003 2:17 PM To: Scott Antonivich; pyt...@ob... Subject: RE: [python-sybase] trying to get sybase to work with a python script Have you set the environment variable SYBASE -jeff -----Original Message----- From: Scott Antonivich [mailto:sc...@tp...] Sent: Tuesday, July 15, 2003 11:16 AM To: pyt...@ob... Subject: FW: [python-sybase] trying to get sybase to work with a python script I have installed sybase-0.36, freetds-0.61-2.i386.rpm, freetds-devel-0.61-2.i386.rpm So, are you saying I am somehow missing libcs? It is possible for me to download and install this as a redhat rpm? Forgive my 'green' questions...I am new at this. Scott -----Original Message----- From: pyt...@ob... [mailto:pyt...@ob...]On Behalf Of Sha...@su... Sent: Tuesday, July 15, 2003 1:51 PM To: sc...@tp...; pyt...@ob... Subject: RE: [python-sybase] trying to get sybase to work with a python script What version of Sybase are you working with? Python-sybase? Operating System? The error indicates that, somehow, you're missing libcs (a Sybase library) -- it's probably a misconfigured environment setting in the process of building the python extension. However, without some more details, it's hard to help you more. Have fun, Shai. -----Original Message----- From: Scott Antonivich [mailto:sc...@tp...] Sent: Tuesday, July 15, 2003 20:24 To: pyt...@ob... Subject: [python-sybase] trying to get sybase to work with a python script I am trying to get sybase to work with a python script. I am getting this error: ImportError: /usr/lib/python2.2/site-packages/sybasect.so: undefined symbol: cs_dt_info I thought maybe someone may have ran into this before...any ideas on how to fix it? Scott _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: Jeff Y. <jyo...@of...> - 2003-07-16 11:16:40
|
Have you set the environment variable SYBASE -jeff -----Original Message----- From: Scott Antonivich [mailto:sc...@tp...] Sent: Tuesday, July 15, 2003 11:16 AM To: pyt...@ob... Subject: FW: [python-sybase] trying to get sybase to work with a python script I have installed sybase-0.36, freetds-0.61-2.i386.rpm, freetds-devel-0.61-2.i386.rpm So, are you saying I am somehow missing libcs? It is possible for me to download and install this as a redhat rpm? Forgive my 'green' = questions...I am new at this. Scott -----Original Message----- From: pyt...@ob... [mailto:pyt...@ob...]On Behalf Of Sha...@su... Sent: Tuesday, July 15, 2003 1:51 PM To: sc...@tp...; pyt...@ob... Subject: RE: [python-sybase] trying to get sybase to work with a python script What version of Sybase are you working with? Python-sybase? Operating System? The error indicates that, somehow, you're missing libcs (a Sybase library) -- it's probably a misconfigured environment setting in the process of building the python extension. However, without some more details, it's hard to help you more. Have fun, Shai. -----Original Message----- From: Scott Antonivich [mailto:sc...@tp...] Sent: Tuesday, July 15, 2003 20:24 To: pyt...@ob... Subject: [python-sybase] trying to get sybase to work with a python script I am trying to get sybase to work with a python script. I am getting this error: ImportError: /usr/lib/python2.2/site-packages/sybasect.so: undefined symbol: cs_dt_info I thought maybe someone may have ran into this before...any ideas on how to fix it? Scott _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: Scott A. <sc...@tp...> - 2003-07-16 11:15:53
|
I have installed sybase-0.36, freetds-0.61-2.i386.rpm, freetds-devel-0.61-2.i386.rpm So, are you saying I am somehow missing libcs? It is possible for me to download and install this as a redhat rpm? Forgive my 'green' questions...I am new at this. Scott -----Original Message----- From: pyt...@ob... [mailto:pyt...@ob...]On Behalf Of Sha...@su... Sent: Tuesday, July 15, 2003 1:51 PM To: sc...@tp...; pyt...@ob... Subject: RE: [python-sybase] trying to get sybase to work with a python script What version of Sybase are you working with? Python-sybase? Operating System? The error indicates that, somehow, you're missing libcs (a Sybase library) -- it's probably a misconfigured environment setting in the process of building the python extension. However, without some more details, it's hard to help you more. Have fun, Shai. -----Original Message----- From: Scott Antonivich [mailto:sc...@tp...] Sent: Tuesday, July 15, 2003 20:24 To: pyt...@ob... Subject: [python-sybase] trying to get sybase to work with a python script I am trying to get sybase to work with a python script. I am getting this error: ImportError: /usr/lib/python2.2/site-packages/sybasect.so: undefined symbol: cs_dt_info I thought maybe someone may have ran into this before...any ideas on how to fix it? Scott _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: <Sha...@su...> - 2003-07-16 10:50:37
|
What version of Sybase are you working with? Python-sybase? Operating System? The error indicates that, somehow, you're missing libcs (a Sybase library) -- it's probably a misconfigured environment setting in the process of building the python extension. However, without some more details, it's hard to help you more. Have fun, Shai. -----Original Message----- From: Scott Antonivich [mailto:sc...@tp...]=20 Sent: Tuesday, July 15, 2003 20:24 To: pyt...@ob... Subject: [python-sybase] trying to get sybase to work with a python script I am trying to get sybase to work with a python script. I am getting this error: ImportError: /usr/lib/python2.2/site-packages/sybasect.so: undefined symbol: cs_dt_info I thought maybe someone may have ran into this before...any ideas on how to fix it? Scott _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: Scott A. <sc...@tp...> - 2003-07-16 10:23:12
|
I am trying to get sybase to work with a python script. I am getting this error: ImportError: /usr/lib/python2.2/site-packages/sybasect.so: undefined symbol: cs_dt_info I thought maybe someone may have ran into this before...any ideas on how to fix it? Scott |